Documentation ¶
Index ¶
- Constants
- type BindingCredentials
- type Defaults
- type ITfClient
- type ITfClientInitializer
- type PlanIdResolver
- type ResourcesStatus
- type ServiceManagerClient
- type ServiceManagerInstanceProxyClient
- type SubaccountServiceFake
- func (s *SubaccountServiceFake) CloneNeoSubaccount(ctx context.Context, sourceSubaccountGUID string) saops.ApiCloneNeoSubaccountRequest
- func (s *SubaccountServiceFake) CloneNeoSubaccountExecute(r saops.ApiCloneNeoSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) CreateOrUpdateSubaccountSettings(ctx context.Context, subaccountGUID string) saops.ApiCreateOrUpdateSubaccountSettingsRequest
- func (s *SubaccountServiceFake) CreateOrUpdateSubaccountSettingsExecute(r saops.ApiCreateOrUpdateSubaccountSettingsRequest) (*saops.DataResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) CreateServiceManagementBinding(ctx context.Context, subaccountGUID string) saops.ApiCreateServiceManagementBindingRequest
- func (s *SubaccountServiceFake) CreateServiceManagementBindingExecute(r saops.ApiCreateServiceManagementBindingRequest) (*saops.ServiceManagerBindingResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) CreateServiceManagerBindingV2(ctx context.Context, subaccountGUID string) saops.ApiCreateServiceManagerBindingV2Request
- func (s *SubaccountServiceFake) CreateServiceManagerBindingV2Execute(r saops.ApiCreateServiceManagerBindingV2Request) (*saops.ServiceManagerBindingExtendedResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) CreateSubaccount(ctx context.Context) saops.ApiCreateSubaccountRequest
- func (s *SubaccountServiceFake) CreateSubaccountExecute(r saops.ApiCreateSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) CreateSubaccountLabels(ctx context.Context, subaccountGUID string) saops.ApiCreateSubaccountLabelsRequest
- func (s *SubaccountServiceFake) CreateSubaccountLabelsExecute(r saops.ApiCreateSubaccountLabelsRequest) (*saops.LabelsResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) DeleteServiceManagementBindingOfSubaccount(ctx context.Context, subaccountGUID string) saops.ApiDeleteServiceManagementBindingOfSubaccountRequest
- func (s *SubaccountServiceFake) DeleteServiceManagementBindingOfSubaccountExecute(r saops.ApiDeleteServiceManagementBindingOfSubaccountRequest) (*http.Response, error)
- func (s *SubaccountServiceFake) DeleteServiceManagerBindingV2(ctx context.Context, subaccountGUID string, bindingName string) saops.ApiDeleteServiceManagerBindingV2Request
- func (s *SubaccountServiceFake) DeleteServiceManagerBindingV2Execute(r saops.ApiDeleteServiceManagerBindingV2Request) (*http.Response, error)
- func (s *SubaccountServiceFake) DeleteSubaccount(ctx context.Context, subaccountGUID string) saops.ApiDeleteSubaccountRequest
- func (s *SubaccountServiceFake) DeleteSubaccountExecute(r saops.ApiDeleteSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) DeleteSubaccountLabels(ctx context.Context, subaccountGUID string) saops.ApiDeleteSubaccountLabelsRequest
- func (s *SubaccountServiceFake) DeleteSubaccountLabelsExecute(r saops.ApiDeleteSubaccountLabelsRequest) (*saops.LabelsResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) DeleteSubaccountSettings(ctx context.Context, subaccountGUID string) saops.ApiDeleteSubaccountSettingsRequest
- func (s *SubaccountServiceFake) DeleteSubaccountSettingsExecute(r saops.ApiDeleteSubaccountSettingsRequest) (*saops.DataResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) GetAllServiceManagerBindingsV2(ctx context.Context, subaccountGUID string) saops.ApiGetAllServiceManagerBindingsV2Request
- func (s *SubaccountServiceFake) GetAllServiceManagerBindingsV2Execute(r saops.ApiGetAllServiceManagerBindingsV2Request) (*saops.ServiceManagerBindingsResponseList, *http.Response, error)
- func (s *SubaccountServiceFake) GetServiceManagementBinding(ctx context.Context, subaccountGUID string) saops.ApiGetServiceManagementBindingRequest
- func (s *SubaccountServiceFake) GetServiceManagementBindingExecute(r saops.ApiGetServiceManagementBindingRequest) (*saops.ServiceManagerBindingResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) GetServiceManagerBindingV2(ctx context.Context, subaccountGUID string, bindingName string) saops.ApiGetServiceManagerBindingV2Request
- func (s *SubaccountServiceFake) GetServiceManagerBindingV2Execute(r saops.ApiGetServiceManagerBindingV2Request) (*saops.ServiceManagerBindingExtendedResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) GetSubaccount(ctx context.Context, subaccountGUID string) saops.ApiGetSubaccountRequest
- func (s *SubaccountServiceFake) GetSubaccountCustomProperties(ctx context.Context, subaccountGUID string) saops.ApiGetSubaccountCustomPropertiesRequest
- func (s *SubaccountServiceFake) GetSubaccountCustomPropertiesExecute(r saops.ApiGetSubaccountCustomPropertiesRequest) (*saops.ResponseCollection, *http.Response, error)
- func (s *SubaccountServiceFake) GetSubaccountExecute(r saops.ApiGetSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) GetSubaccountLabels(ctx context.Context, subaccountGUID string) saops.ApiGetSubaccountLabelsRequest
- func (s *SubaccountServiceFake) GetSubaccountLabelsExecute(r saops.ApiGetSubaccountLabelsRequest) (*saops.LabelsResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) GetSubaccountSettings(ctx context.Context, subaccountGUID string) saops.ApiGetSubaccountSettingsRequest
- func (s *SubaccountServiceFake) GetSubaccountSettingsExecute(r saops.ApiGetSubaccountSettingsRequest) (*saops.DataResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) GetSubaccounts(ctx context.Context) saops.ApiGetSubaccountsRequest
- func (s *SubaccountServiceFake) GetSubaccountsExecute(r saops.ApiGetSubaccountsRequest) (*saops.ResponseCollection, *http.Response, error)
- func (s *SubaccountServiceFake) MoveSubaccount(ctx context.Context, subaccountGUID string) saops.ApiMoveSubaccountRequest
- func (s *SubaccountServiceFake) MoveSubaccountExecute(r saops.ApiMoveSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
- func (s *SubaccountServiceFake) MoveSubaccounts(ctx context.Context) saops.ApiMoveSubaccountsRequest
- func (s *SubaccountServiceFake) MoveSubaccountsExecute(r saops.ApiMoveSubaccountsRequest) (*saops.ResponseCollection, *http.Response, error)
- func (s *SubaccountServiceFake) UpdateSubaccount(ctx context.Context, subaccountGUID string) saops.ApiUpdateSubaccountRequest
- func (s *SubaccountServiceFake) UpdateSubaccountExecute(r saops.ApiUpdateSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
- type TfClient
- func (tf *TfClient) CreateResources(ctx context.Context, cr *apisv1beta1.ServiceManager) (string, string, error)
- func (tf *TfClient) DeleteResources(ctx context.Context, cr *apisv1beta1.ServiceManager) error
- func (tf *TfClient) ObserveResources(ctx context.Context, cr *apisv1beta1.ServiceManager) (ResourcesStatus, error)
- func (tf *TfClient) UpdateResources(ctx context.Context, cr *apisv1beta1.ServiceManager) error
- type TfClientInitializer
Constants ¶
const ErrInvalidSecretData = "BindingCredentials can't be created from invalid secret data"
const ServiceManagerOfferingName = "service-manager"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindingCredentials ¶
type BindingCredentials struct { Clientid *string `json:"clientid,omitempty"` Clientsecret *string `json:"clientsecret,omitempty"` SmUrl *string `json:"sm_url,omitempty"` Url *string `json:"url,omitempty"` Xsappname *string `json:"xsappname,omitempty"` }
func NewCredsFromOperatorSecret ¶
func NewCredsFromOperatorSecret(secretData map[string][]byte) (BindingCredentials, error)
NewCredsFromOperatorSecret creates a new BindingCredentials from a secret data of a btp service operator secret, which is slightly different in structure then the creds of a regular servicebinding
type ITfClient ¶
type ITfClient interface { ObserveResources(ctx context.Context, cr *apisv1beta1.ServiceManager) (ResourcesStatus, error) CreateResources(ctx context.Context, cr *apisv1beta1.ServiceManager) (string, string, error) UpdateResources(ctx context.Context, cr *apisv1beta1.ServiceManager) error DeleteResources(ctx context.Context, cr *apisv1beta1.ServiceManager) error }
ITfClient contains domain logic for managing ServiceManager lifecycle
type ITfClientInitializer ¶
type ITfClientInitializer interface {
ConnectResources(ctx context.Context, cr *apisv1beta1.ServiceManager) (ITfClient, error)
}
ITfClientInitializer will produce the ITfClient used by external
type PlanIdResolver ¶
type PlanIdResolver interface {
PlanIDByName(ctx context.Context, offeringName string, servicePlanName string) (string, error)
}
PlanIdResolver used as its own resolval implementation downstream
type ResourcesStatus ¶
type ResourcesStatus struct { managed.ExternalObservation InstanceID string BindingID string }
ResourcesStatus contains a summary of the status of the tf resources managed by the ITfClient it uses the crossplane terminology for the external observation and enhances it with IDs of the managed instances
type ServiceManagerClient ¶
type ServiceManagerClient struct { servicemanager.ServiceOfferingsAPI servicemanager.ServicePlansAPI }
ServiceManagerClient is a client for looking up serviceplanID over the service manager API, it requires a service manager instance binding
func NewServiceManagerClient ¶
func NewServiceManagerClient(ctx context.Context, creds *BindingCredentials) (*ServiceManagerClient, error)
func (*ServiceManagerClient) PlanIDByName ¶
type ServiceManagerInstanceProxyClient ¶
type ServiceManagerInstanceProxyClient struct { accountsserviceclient.SubaccountOperationsAPI // contains filtered or unexported fields }
ServiceManagerInstanceProxyClient is a throw-away implementation, which retrieves a servicePlanID by - creating an intermediate subaccount-admin servicemanager instance via the accountsapi - looksup the servicePLanID via those created credentials binding - deletes this intermediate servicemanager instance -> THIS NEEDS TO BE REPLACED VIA TF DATASOURCES AS SOON AS THOSE ARE AVAILABLE IN UPJET
func NewServiceManagerInstanceProxyClient ¶
func NewServiceManagerInstanceProxyClient(apiClient *accountsserviceclient.APIClient) ServiceManagerInstanceProxyClient
func (ServiceManagerInstanceProxyClient) ServiceManagerPlanIDByName ¶
type SubaccountServiceFake ¶
type SubaccountServiceFake struct { CreateMockFn func() (*saops.ServiceManagerBindingResponseObject, *http.Response, error) GetMockFn func() (*saops.ServiceManagerBindingResponseObject, *http.Response, error) DeleteMockFn func() (*http.Response, error) AdminBindingDeleteCalled bool }
func (*SubaccountServiceFake) CloneNeoSubaccount ¶
func (s *SubaccountServiceFake) CloneNeoSubaccount(ctx context.Context, sourceSubaccountGUID string) saops.ApiCloneNeoSubaccountRequest
func (*SubaccountServiceFake) CloneNeoSubaccountExecute ¶
func (s *SubaccountServiceFake) CloneNeoSubaccountExecute(r saops.ApiCloneNeoSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
func (*SubaccountServiceFake) CreateOrUpdateSubaccountSettings ¶
func (s *SubaccountServiceFake) CreateOrUpdateSubaccountSettings(ctx context.Context, subaccountGUID string) saops.ApiCreateOrUpdateSubaccountSettingsRequest
func (*SubaccountServiceFake) CreateOrUpdateSubaccountSettingsExecute ¶
func (s *SubaccountServiceFake) CreateOrUpdateSubaccountSettingsExecute(r saops.ApiCreateOrUpdateSubaccountSettingsRequest) (*saops.DataResponseObject, *http.Response, error)
func (*SubaccountServiceFake) CreateServiceManagementBinding ¶
func (s *SubaccountServiceFake) CreateServiceManagementBinding(ctx context.Context, subaccountGUID string) saops.ApiCreateServiceManagementBindingRequest
func (*SubaccountServiceFake) CreateServiceManagementBindingExecute ¶
func (s *SubaccountServiceFake) CreateServiceManagementBindingExecute(r saops.ApiCreateServiceManagementBindingRequest) (*saops.ServiceManagerBindingResponseObject, *http.Response, error)
func (*SubaccountServiceFake) CreateServiceManagerBindingV2 ¶
func (s *SubaccountServiceFake) CreateServiceManagerBindingV2(ctx context.Context, subaccountGUID string) saops.ApiCreateServiceManagerBindingV2Request
func (*SubaccountServiceFake) CreateServiceManagerBindingV2Execute ¶
func (s *SubaccountServiceFake) CreateServiceManagerBindingV2Execute(r saops.ApiCreateServiceManagerBindingV2Request) (*saops.ServiceManagerBindingExtendedResponseObject, *http.Response, error)
func (*SubaccountServiceFake) CreateSubaccount ¶
func (s *SubaccountServiceFake) CreateSubaccount(ctx context.Context) saops.ApiCreateSubaccountRequest
func (*SubaccountServiceFake) CreateSubaccountExecute ¶
func (s *SubaccountServiceFake) CreateSubaccountExecute(r saops.ApiCreateSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
func (*SubaccountServiceFake) CreateSubaccountLabels ¶
func (s *SubaccountServiceFake) CreateSubaccountLabels(ctx context.Context, subaccountGUID string) saops.ApiCreateSubaccountLabelsRequest
func (*SubaccountServiceFake) CreateSubaccountLabelsExecute ¶
func (s *SubaccountServiceFake) CreateSubaccountLabelsExecute(r saops.ApiCreateSubaccountLabelsRequest) (*saops.LabelsResponseObject, *http.Response, error)
func (*SubaccountServiceFake) DeleteServiceManagementBindingOfSubaccount ¶
func (s *SubaccountServiceFake) DeleteServiceManagementBindingOfSubaccount(ctx context.Context, subaccountGUID string) saops.ApiDeleteServiceManagementBindingOfSubaccountRequest
func (*SubaccountServiceFake) DeleteServiceManagementBindingOfSubaccountExecute ¶
func (s *SubaccountServiceFake) DeleteServiceManagementBindingOfSubaccountExecute(r saops.ApiDeleteServiceManagementBindingOfSubaccountRequest) (*http.Response, error)
func (*SubaccountServiceFake) DeleteServiceManagerBindingV2 ¶
func (s *SubaccountServiceFake) DeleteServiceManagerBindingV2(ctx context.Context, subaccountGUID string, bindingName string) saops.ApiDeleteServiceManagerBindingV2Request
func (*SubaccountServiceFake) DeleteServiceManagerBindingV2Execute ¶
func (s *SubaccountServiceFake) DeleteServiceManagerBindingV2Execute(r saops.ApiDeleteServiceManagerBindingV2Request) (*http.Response, error)
func (*SubaccountServiceFake) DeleteSubaccount ¶
func (s *SubaccountServiceFake) DeleteSubaccount(ctx context.Context, subaccountGUID string) saops.ApiDeleteSubaccountRequest
func (*SubaccountServiceFake) DeleteSubaccountExecute ¶
func (s *SubaccountServiceFake) DeleteSubaccountExecute(r saops.ApiDeleteSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
func (*SubaccountServiceFake) DeleteSubaccountLabels ¶
func (s *SubaccountServiceFake) DeleteSubaccountLabels(ctx context.Context, subaccountGUID string) saops.ApiDeleteSubaccountLabelsRequest
func (*SubaccountServiceFake) DeleteSubaccountLabelsExecute ¶
func (s *SubaccountServiceFake) DeleteSubaccountLabelsExecute(r saops.ApiDeleteSubaccountLabelsRequest) (*saops.LabelsResponseObject, *http.Response, error)
func (*SubaccountServiceFake) DeleteSubaccountSettings ¶
func (s *SubaccountServiceFake) DeleteSubaccountSettings(ctx context.Context, subaccountGUID string) saops.ApiDeleteSubaccountSettingsRequest
func (*SubaccountServiceFake) DeleteSubaccountSettingsExecute ¶
func (s *SubaccountServiceFake) DeleteSubaccountSettingsExecute(r saops.ApiDeleteSubaccountSettingsRequest) (*saops.DataResponseObject, *http.Response, error)
func (*SubaccountServiceFake) GetAllServiceManagerBindingsV2 ¶
func (s *SubaccountServiceFake) GetAllServiceManagerBindingsV2(ctx context.Context, subaccountGUID string) saops.ApiGetAllServiceManagerBindingsV2Request
func (*SubaccountServiceFake) GetAllServiceManagerBindingsV2Execute ¶
func (s *SubaccountServiceFake) GetAllServiceManagerBindingsV2Execute(r saops.ApiGetAllServiceManagerBindingsV2Request) (*saops.ServiceManagerBindingsResponseList, *http.Response, error)
func (*SubaccountServiceFake) GetServiceManagementBinding ¶
func (s *SubaccountServiceFake) GetServiceManagementBinding(ctx context.Context, subaccountGUID string) saops.ApiGetServiceManagementBindingRequest
func (*SubaccountServiceFake) GetServiceManagementBindingExecute ¶
func (s *SubaccountServiceFake) GetServiceManagementBindingExecute(r saops.ApiGetServiceManagementBindingRequest) (*saops.ServiceManagerBindingResponseObject, *http.Response, error)
func (*SubaccountServiceFake) GetServiceManagerBindingV2 ¶
func (s *SubaccountServiceFake) GetServiceManagerBindingV2(ctx context.Context, subaccountGUID string, bindingName string) saops.ApiGetServiceManagerBindingV2Request
func (*SubaccountServiceFake) GetServiceManagerBindingV2Execute ¶
func (s *SubaccountServiceFake) GetServiceManagerBindingV2Execute(r saops.ApiGetServiceManagerBindingV2Request) (*saops.ServiceManagerBindingExtendedResponseObject, *http.Response, error)
func (*SubaccountServiceFake) GetSubaccount ¶
func (s *SubaccountServiceFake) GetSubaccount(ctx context.Context, subaccountGUID string) saops.ApiGetSubaccountRequest
func (*SubaccountServiceFake) GetSubaccountCustomProperties ¶
func (s *SubaccountServiceFake) GetSubaccountCustomProperties(ctx context.Context, subaccountGUID string) saops.ApiGetSubaccountCustomPropertiesRequest
func (*SubaccountServiceFake) GetSubaccountCustomPropertiesExecute ¶
func (s *SubaccountServiceFake) GetSubaccountCustomPropertiesExecute(r saops.ApiGetSubaccountCustomPropertiesRequest) (*saops.ResponseCollection, *http.Response, error)
func (*SubaccountServiceFake) GetSubaccountExecute ¶
func (s *SubaccountServiceFake) GetSubaccountExecute(r saops.ApiGetSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
func (*SubaccountServiceFake) GetSubaccountLabels ¶
func (s *SubaccountServiceFake) GetSubaccountLabels(ctx context.Context, subaccountGUID string) saops.ApiGetSubaccountLabelsRequest
func (*SubaccountServiceFake) GetSubaccountLabelsExecute ¶
func (s *SubaccountServiceFake) GetSubaccountLabelsExecute(r saops.ApiGetSubaccountLabelsRequest) (*saops.LabelsResponseObject, *http.Response, error)
func (*SubaccountServiceFake) GetSubaccountSettings ¶
func (s *SubaccountServiceFake) GetSubaccountSettings(ctx context.Context, subaccountGUID string) saops.ApiGetSubaccountSettingsRequest
func (*SubaccountServiceFake) GetSubaccountSettingsExecute ¶
func (s *SubaccountServiceFake) GetSubaccountSettingsExecute(r saops.ApiGetSubaccountSettingsRequest) (*saops.DataResponseObject, *http.Response, error)
func (*SubaccountServiceFake) GetSubaccounts ¶
func (s *SubaccountServiceFake) GetSubaccounts(ctx context.Context) saops.ApiGetSubaccountsRequest
func (*SubaccountServiceFake) GetSubaccountsExecute ¶
func (s *SubaccountServiceFake) GetSubaccountsExecute(r saops.ApiGetSubaccountsRequest) (*saops.ResponseCollection, *http.Response, error)
func (*SubaccountServiceFake) MoveSubaccount ¶
func (s *SubaccountServiceFake) MoveSubaccount(ctx context.Context, subaccountGUID string) saops.ApiMoveSubaccountRequest
func (*SubaccountServiceFake) MoveSubaccountExecute ¶
func (s *SubaccountServiceFake) MoveSubaccountExecute(r saops.ApiMoveSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
func (*SubaccountServiceFake) MoveSubaccounts ¶
func (s *SubaccountServiceFake) MoveSubaccounts(ctx context.Context) saops.ApiMoveSubaccountsRequest
func (*SubaccountServiceFake) MoveSubaccountsExecute ¶
func (s *SubaccountServiceFake) MoveSubaccountsExecute(r saops.ApiMoveSubaccountsRequest) (*saops.ResponseCollection, *http.Response, error)
func (*SubaccountServiceFake) UpdateSubaccount ¶
func (s *SubaccountServiceFake) UpdateSubaccount(ctx context.Context, subaccountGUID string) saops.ApiUpdateSubaccountRequest
func (*SubaccountServiceFake) UpdateSubaccountExecute ¶
func (s *SubaccountServiceFake) UpdateSubaccountExecute(r saops.ApiUpdateSubaccountRequest) (*saops.SubaccountResponseObject, *http.Response, error)
type TfClient ¶
type TfClient struct {
// contains filtered or unexported fields
}
func (*TfClient) CreateResources ¶
func (tf *TfClient) CreateResources(ctx context.Context, cr *apisv1beta1.ServiceManager) (string, string, error)
CreateResources creates the service manager instance and binding What of the resources need to be created is determined by set IDs in SM's status
func (*TfClient) DeleteResources ¶
func (tf *TfClient) DeleteResources(ctx context.Context, cr *apisv1beta1.ServiceManager) error
func (*TfClient) ObserveResources ¶
func (tf *TfClient) ObserveResources(ctx context.Context, cr *apisv1beta1.ServiceManager) (ResourcesStatus, error)
func (*TfClient) UpdateResources ¶
func (tf *TfClient) UpdateResources(ctx context.Context, cr *apisv1beta1.ServiceManager) error
type TfClientInitializer ¶
type TfClientInitializer struct {
// contains filtered or unexported fields
}
func NewServiceManagerTfClient ¶
func NewServiceManagerTfClient(sConnector managed.ExternalConnecter, sbConnector managed.ExternalConnecter, defaults Defaults) *TfClientInitializer
func (*TfClientInitializer) ConnectResources ¶
func (tfI *TfClientInitializer) ConnectResources(ctx context.Context, cr *apisv1beta1.ServiceManager) (ITfClient, error)