Documentation
¶
Index ¶
- func GetJSON(value string) (string, error)
- func IsServiceBindingCreated(btp *BTPUtils, options GetServiceBindingOptions) bool
- func IsServiceBindingDeleted(btp *BTPUtils, options GetServiceBindingOptions) bool
- func IsServiceInstanceCreated(btp *BTPUtils, options GetServiceInstanceOptions) bool
- func IsServiceInstanceDeleted(btp *BTPUtils, options GetServiceInstanceOptions) bool
- type BTPCommandBuilder
- func (b *BTPCommandBuilder) Build() ([]string, error)
- func (b *BTPCommandBuilder) Reset() *BTPCommandBuilder
- func (b *BTPCommandBuilder) SetConfirm(value bool) *BTPCommandBuilder
- func (b *BTPCommandBuilder) SetShowParameters(value bool) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithAction(action string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithBindingName(name string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithConfirm() *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithDataCenter(name string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithFieldsFilter(query string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithFormat(format string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithID(id string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithLabels(json string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithLabelsFilter(query string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithName(name string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithOfferingName(name string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithOption(option string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithParam(param string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithParameters(json string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithPassword(password string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithPlanID(id string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithPlanName(name string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithService(name string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithServiceInstanceID(id string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithServiceInstanceName(name string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithSubAccount(subaccount string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithSubdomain(globalAccount string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithTarget(target string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithTenant(tenantID string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithURL(url string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithUser(user string) *BTPCommandBuilder
- func (b *BTPCommandBuilder) WithVerbose() *BTPCommandBuilder
- type BTPUtils
- func (btp *BTPUtils) CreateServiceBinding(options CreateServiceBindingOptions) (string, error)
- func (btp *BTPUtils) CreateServiceInstance(options CreateServiceInstanceOptions) (string, error)
- func (btp *BTPUtils) DeleteServiceBinding(options DeleteServiceBindingOptions) error
- func (btp *BTPUtils) DeleteServiceInstance(options DeleteServiceInstanceOptions) error
- func (btp *BTPUtils) GetServiceBinding(options GetServiceBindingOptions) (string, error)
- func (btp *BTPUtils) GetServiceInstance(options GetServiceInstanceOptions) (string, error)
- func (btp *BTPUtils) Login(options LoginOptions) error
- func (btp *BTPUtils) Logout() error
- func (btp *BTPUtils) SetConfig(options ConfigOptions) error
- type BtpExecCall
- type BtpExecutorMock
- type ConfigOptions
- type CreateServiceBindingOptions
- type CreateServiceInstanceOptions
- type DeleteServiceBindingOptions
- type DeleteServiceInstanceOptions
- type ExecRunner
- type Executor
- type GetServiceBindingOptions
- type GetServiceInstanceOptions
- type LoginOptions
- type RunSyncOptions
- type ServiceBindingData
- type ServiceInstanceData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsServiceBindingCreated ¶
func IsServiceBindingCreated(btp *BTPUtils, options GetServiceBindingOptions) bool
func IsServiceBindingDeleted ¶
func IsServiceBindingDeleted(btp *BTPUtils, options GetServiceBindingOptions) bool
func IsServiceInstanceCreated ¶
func IsServiceInstanceCreated(btp *BTPUtils, options GetServiceInstanceOptions) bool
func IsServiceInstanceDeleted ¶
func IsServiceInstanceDeleted(btp *BTPUtils, options GetServiceInstanceOptions) bool
Types ¶
type BTPCommandBuilder ¶
type BTPCommandBuilder struct {
// contains filtered or unexported fields
}
func (*BTPCommandBuilder) Build ¶
func (b *BTPCommandBuilder) Build() ([]string, error)
Build the final command string
func (*BTPCommandBuilder) Reset ¶
func (b *BTPCommandBuilder) Reset() *BTPCommandBuilder
Rest builder
func (*BTPCommandBuilder) SetConfirm ¶
func (b *BTPCommandBuilder) SetConfirm(value bool) *BTPCommandBuilder
Specific method for --confirm parameter
func (*BTPCommandBuilder) SetShowParameters ¶
func (b *BTPCommandBuilder) SetShowParameters(value bool) *BTPCommandBuilder
Specific method for --show-parameters parameter
func (*BTPCommandBuilder) WithAction ¶
func (b *BTPCommandBuilder) WithAction(action string) *BTPCommandBuilder
Method to set action
func (*BTPCommandBuilder) WithBindingName ¶
func (b *BTPCommandBuilder) WithBindingName(name string) *BTPCommandBuilder
Specific method for --binding parameter
func (*BTPCommandBuilder) WithConfirm ¶
func (b *BTPCommandBuilder) WithConfirm() *BTPCommandBuilder
func (*BTPCommandBuilder) WithDataCenter ¶
func (b *BTPCommandBuilder) WithDataCenter(name string) *BTPCommandBuilder
Specific method for --data-center parameter
func (*BTPCommandBuilder) WithFieldsFilter ¶
func (b *BTPCommandBuilder) WithFieldsFilter(query string) *BTPCommandBuilder
Specific method for --fields-filter parameter
func (*BTPCommandBuilder) WithFormat ¶
func (b *BTPCommandBuilder) WithFormat(format string) *BTPCommandBuilder
Method to set format of response
func (*BTPCommandBuilder) WithID ¶
func (b *BTPCommandBuilder) WithID(id string) *BTPCommandBuilder
Specific method for --id parameter
func (*BTPCommandBuilder) WithLabels ¶
func (b *BTPCommandBuilder) WithLabels(json string) *BTPCommandBuilder
Specific method for --labels parameter
func (*BTPCommandBuilder) WithLabelsFilter ¶
func (b *BTPCommandBuilder) WithLabelsFilter(query string) *BTPCommandBuilder
Specific method for --labels-filter parameter
func (*BTPCommandBuilder) WithName ¶
func (b *BTPCommandBuilder) WithName(name string) *BTPCommandBuilder
Specific method for --name parameter
func (*BTPCommandBuilder) WithOfferingName ¶
func (b *BTPCommandBuilder) WithOfferingName(name string) *BTPCommandBuilder
Specific method for --offering-name parameter
func (*BTPCommandBuilder) WithOption ¶
func (b *BTPCommandBuilder) WithOption(option string) *BTPCommandBuilder
General method to add an option
func (*BTPCommandBuilder) WithParam ¶
func (b *BTPCommandBuilder) WithParam(param string) *BTPCommandBuilder
Method to add additional parameters
func (*BTPCommandBuilder) WithParameters ¶
func (b *BTPCommandBuilder) WithParameters(json string) *BTPCommandBuilder
Specific method for --offering-name parameter
func (*BTPCommandBuilder) WithPassword ¶
func (b *BTPCommandBuilder) WithPassword(password string) *BTPCommandBuilder
Specific method for --password parameter
func (*BTPCommandBuilder) WithPlanID ¶
func (b *BTPCommandBuilder) WithPlanID(id string) *BTPCommandBuilder
Specific method for --plan parameter
func (*BTPCommandBuilder) WithPlanName ¶
func (b *BTPCommandBuilder) WithPlanName(name string) *BTPCommandBuilder
Specific method for --plan-name parameter
func (*BTPCommandBuilder) WithService ¶
func (b *BTPCommandBuilder) WithService(name string) *BTPCommandBuilder
Specific method for --service parameter
func (*BTPCommandBuilder) WithServiceInstanceID ¶
func (b *BTPCommandBuilder) WithServiceInstanceID(id string) *BTPCommandBuilder
Specific method for --instance-name parameter
func (*BTPCommandBuilder) WithServiceInstanceName ¶
func (b *BTPCommandBuilder) WithServiceInstanceName(name string) *BTPCommandBuilder
Specific method for --instance-name parameter
func (*BTPCommandBuilder) WithSubAccount ¶
func (b *BTPCommandBuilder) WithSubAccount(subaccount string) *BTPCommandBuilder
Specific method for --subaccount parameter
func (*BTPCommandBuilder) WithSubdomain ¶
func (b *BTPCommandBuilder) WithSubdomain(globalAccount string) *BTPCommandBuilder
Specific method for --subdomain parameter
func (*BTPCommandBuilder) WithTarget ¶
func (b *BTPCommandBuilder) WithTarget(target string) *BTPCommandBuilder
Method to set target (e.g., GROUP/OBJECT)
func (*BTPCommandBuilder) WithTenant ¶
func (b *BTPCommandBuilder) WithTenant(tenantID string) *BTPCommandBuilder
Specific method for --idp parameter
func (*BTPCommandBuilder) WithURL ¶
func (b *BTPCommandBuilder) WithURL(url string) *BTPCommandBuilder
Specific method for --url parameter
func (*BTPCommandBuilder) WithUser ¶
func (b *BTPCommandBuilder) WithUser(user string) *BTPCommandBuilder
Specific method for --user parameter
func (*BTPCommandBuilder) WithVerbose ¶
func (b *BTPCommandBuilder) WithVerbose() *BTPCommandBuilder
Method to activate verbose mode
type BTPUtils ¶
type BTPUtils struct {
Exec ExecRunner
}
func NewBTPUtils ¶
func NewBTPUtils(exec ExecRunner) *BTPUtils
func (*BTPUtils) CreateServiceBinding ¶
func (btp *BTPUtils) CreateServiceBinding(options CreateServiceBindingOptions) (string, error)
func (*BTPUtils) CreateServiceInstance ¶
func (btp *BTPUtils) CreateServiceInstance(options CreateServiceInstanceOptions) (string, error)
func (*BTPUtils) DeleteServiceBinding ¶
func (btp *BTPUtils) DeleteServiceBinding(options DeleteServiceBindingOptions) error
func (*BTPUtils) DeleteServiceInstance ¶
func (btp *BTPUtils) DeleteServiceInstance(options DeleteServiceInstanceOptions) error
func (*BTPUtils) GetServiceBinding ¶
func (btp *BTPUtils) GetServiceBinding(options GetServiceBindingOptions) (string, error)
func (*BTPUtils) GetServiceInstance ¶
func (btp *BTPUtils) GetServiceInstance(options GetServiceInstanceOptions) (string, error)
func (*BTPUtils) Login ¶
func (btp *BTPUtils) Login(options LoginOptions) error
func (*BTPUtils) SetConfig ¶
func (btp *BTPUtils) SetConfig(options ConfigOptions) error
type BtpExecCall ¶
Stores information about executed commands.
type BtpExecutorMock ¶
type BtpExecutorMock struct {
Cmd command.Command
Calls []BtpExecCall
StdoutReturn map[string]string
ShouldFailOnCommand map[string]error
ExitCode int
// contains filtered or unexported fields
}
func (*BtpExecutorMock) GetStdoutValue ¶
func (b *BtpExecutorMock) GetStdoutValue() string
func (*BtpExecutorMock) Run ¶
func (b *BtpExecutorMock) Run(cmdScript []string) (err error)
func (*BtpExecutorMock) RunSync ¶
func (b *BtpExecutorMock) RunSync(opts RunSyncOptions) error
func (*BtpExecutorMock) Stdin ¶
func (b *BtpExecutorMock) Stdin(in io.Reader)
func (*BtpExecutorMock) Stdout ¶
func (b *BtpExecutorMock) Stdout(out io.Writer)
type ConfigOptions ¶
type ExecRunner ¶
type ExecRunner interface {
Run(cmdScript []string) error
RunSync(opts RunSyncOptions) error
// contains filtered or unexported methods
}
type Executor ¶
func (*Executor) GetStdoutValue ¶
func (*Executor) RunSync ¶
func (e *Executor) RunSync(opts RunSyncOptions) (err error)
@param timeout : in seconds @param pollInterval : in seconds @param negativeCheck : set to false if you want to check the negation of the response of `cmdCheck`
type LoginOptions ¶
type RunSyncOptions ¶
type ServiceBindingData ¶
type ServiceBindingData struct {
ID string `json:"id"`
Ready bool `json:"ready"`
LastOperation struct {
ID string `json:"id"`
Ready bool `json:"ready"`
Type string `json:"type"`
State string `json:"state"`
ResourceID string `json:"resource_id"`
ResourceType string `json:"resource_type"`
PlatformID string `json:"platform_id"`
CorrelationID string `json:"correlation_id"`
Reschedule bool `json:"reschedule"`
RescheduleTimestamp time.Time `json:"reschedule_timestamp"`
DeletionScheduled time.Time `json:"deletion_scheduled"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
} `json:"last_operation"`
Name string `json:"name"`
ServiceInstanceID string `json:"service_instance_id"`
Context struct {
Origin string `json:"origin"`
Region string `json:"region"`
ZoneID string `json:"zone_id"`
EnvType string `json:"env_type"`
Platform string `json:"platform"`
Subdomain string `json:"subdomain"`
LicenseType string `json:"license_type"`
InstanceName string `json:"instance_name"`
SubaccountID string `json:"subaccount_id"`
CrmCustomerID string `json:"crm_customer_id"`
GlobalAccountID string `json:"global_account_id"`
ServiceInstanceID string `json:"service_instance_id"`
} `json:"context"`
Credentials struct {
Abap struct {
CommunicationArrangementID string `json:"communication_arrangement_id"`
CommunicationInboundUserAuthMode string `json:"communication_inbound_user_auth_mode"`
CommunicationInboundUserID string `json:"communication_inbound_user_id"`
CommunicationScenarioID string `json:"communication_scenario_id"`
CommunicationSystemID string `json:"communication_system_id"`
CommunicationType string `json:"communication_type"`
Password string `json:"password"`
Username string `json:"username"`
} `json:"abap"`
Binding struct {
Env string `json:"env"`
ID string `json:"id"`
Type string `json:"type"`
Version string `json:"version"`
} `json:"binding"`
PreserveHostHeader bool `json:"preserve_host_header"`
SapCloudService string `json:"sap.cloud.service"`
Systemid string `json:"systemid"`
URL string `json:"url"`
} `json:"credentials"`
SubaccountID string `json:"subaccount_id"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Labels string `json:"labels"`
}
type ServiceInstanceData ¶
type ServiceInstanceData struct {
ID string `json:"id"`
Ready bool `json:"ready"`
LastOperation struct {
ID string `json:"id"`
Ready bool `json:"ready"`
Description string `json:"description"`
Type string `json:"type"`
State string `json:"state"`
ResourceID string `json:"resource_id"`
ResourceType string `json:"resource_type"`
PlatformID string `json:"platform_id"`
CorrelationID string `json:"correlation_id"`
Reschedule bool `json:"reschedule"`
RescheduleTimestamp time.Time `json:"reschedule_timestamp"`
DeletionScheduled time.Time `json:"deletion_scheduled"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
} `json:"last_operation"`
Name string `json:"name"`
ServicePlanID string `json:"service_plan_id"`
PlatformID string `json:"platform_id"`
DashboardURL string `json:"dashboard_url"`
Context struct {
Origin string `json:"origin"`
Region string `json:"region"`
ZoneID string `json:"zone_id"`
EnvType string `json:"env_type"`
Platform string `json:"platform"`
Subdomain string `json:"subdomain"`
LicenseType string `json:"license_type"`
InstanceName string `json:"instance_name"`
SubaccountID string `json:"subaccount_id"`
CrmCustomerID string `json:"crm_customer_id"`
GlobalAccountID string `json:"global_account_id"`
} `json:"context"`
Usable bool `json:"usable"`
SubaccountID string `json:"subaccount_id"`
Protected interface{} `json:"protected"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Labels string `json:"labels"`
}