Documentation ¶
Index ¶
- type MockSubscriptionOperationsConsumer
- func (m *MockSubscriptionOperationsConsumer) CreateSubscriptionAsync(ctx context.Context, appName string) saas_client.ApiCreateSubscriptionAsyncRequest
- func (m *MockSubscriptionOperationsConsumer) CreateSubscriptionAsyncExecute(r saas_client.ApiCreateSubscriptionAsyncRequest) (*http.Response, error)
- func (m *MockSubscriptionOperationsConsumer) DeleteSubscriptionAsync(ctx context.Context, appName string) saas_client.ApiDeleteSubscriptionAsyncRequest
- func (m *MockSubscriptionOperationsConsumer) DeleteSubscriptionAsyncExecute(r saas_client.ApiDeleteSubscriptionAsyncRequest) (*http.Response, error)
- func (m *MockSubscriptionOperationsConsumer) DeleteSubscriptionLabels(ctx context.Context, appName string) saas_client.ApiDeleteSubscriptionLabelsRequest
- func (m *MockSubscriptionOperationsConsumer) DeleteSubscriptionLabelsExecute(r saas_client.ApiDeleteSubscriptionLabelsRequest) (*saas_client.LabelsResponseObject, *http.Response, error)
- func (m *MockSubscriptionOperationsConsumer) GetEntitledApplication(ctx context.Context, appName string) saas_client.ApiGetEntitledApplicationRequest
- func (m *MockSubscriptionOperationsConsumer) GetEntitledApplicationExecute(r saas_client.ApiGetEntitledApplicationRequest) (*saas_client.EntitledApplicationsResponseObject, *http.Response, error)
- func (m *MockSubscriptionOperationsConsumer) GetEntitledApplications(ctx context.Context) saas_client.ApiGetEntitledApplicationsRequest
- func (m *MockSubscriptionOperationsConsumer) GetEntitledApplicationsExecute(r saas_client.ApiGetEntitledApplicationsRequest) (*saas_client.EntitledApplicationsResponseCollection, *http.Response, error)
- func (m *MockSubscriptionOperationsConsumer) GetSubscriptionLabels(ctx context.Context, appName string) saas_client.ApiGetSubscriptionLabelsRequest
- func (m *MockSubscriptionOperationsConsumer) GetSubscriptionLabelsExecute(r saas_client.ApiGetSubscriptionLabelsRequest) (*saas_client.LabelsResponseObject, *http.Response, error)
- func (m *MockSubscriptionOperationsConsumer) UpdateSubscriptionParametersAsync(ctx context.Context, appName string) saas_client.ApiUpdateSubscriptionParametersAsyncRequest
- func (m *MockSubscriptionOperationsConsumer) UpdateSubscriptionParametersAsyncExecute(r saas_client.ApiUpdateSubscriptionParametersAsyncRequest) (*http.Response, error)
- func (m *MockSubscriptionOperationsConsumer) UpsertSubscriptionLabels(ctx context.Context, appName string) saas_client.ApiUpsertSubscriptionLabelsRequest
- func (m *MockSubscriptionOperationsConsumer) UpsertSubscriptionLabelsExecute(r saas_client.ApiUpsertSubscriptionLabelsRequest) (*saas_client.LabelsResponseObject, *http.Response, error)
- type SubscriptionApiHandler
- func (s *SubscriptionApiHandler) CreateSubscription(ctx context.Context, subPost SubscriptionPost) (string, error)
- func (s *SubscriptionApiHandler) DeleteSubscription(ctx context.Context, externalName string) error
- func (s *SubscriptionApiHandler) GetSubscription(ctx context.Context, externalName string) (*SubscriptionGet, error)
- func (s *SubscriptionApiHandler) UpdateSubscription(ctx context.Context, externalName string, subPut SubscriptionPut) error
- type SubscriptionApiHandlerI
- type SubscriptionGet
- type SubscriptionPost
- type SubscriptionPut
- type SubscriptionTypeMapper
- func (s *SubscriptionTypeMapper) ConvertToCreatePayload(cr *v1alpha1.Subscription) SubscriptionPost
- func (s *SubscriptionTypeMapper) ConvertToUpdatePayload(cr *v1alpha1.Subscription) SubscriptionPut
- func (s *SubscriptionTypeMapper) IsAvailable(cr *v1alpha1.Subscription) bool
- func (s *SubscriptionTypeMapper) IsUpToDate(cr *v1alpha1.Subscription, get *SubscriptionGet) bool
- func (s *SubscriptionTypeMapper) SyncStatus(get *SubscriptionGet, crStatus *v1alpha1.SubscriptionObservation)
- type SubscriptionTypeMapperI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSubscriptionOperationsConsumer ¶
func (*MockSubscriptionOperationsConsumer) CreateSubscriptionAsync ¶
func (m *MockSubscriptionOperationsConsumer) CreateSubscriptionAsync(ctx context.Context, appName string) saas_client.ApiCreateSubscriptionAsyncRequest
func (*MockSubscriptionOperationsConsumer) CreateSubscriptionAsyncExecute ¶
func (m *MockSubscriptionOperationsConsumer) CreateSubscriptionAsyncExecute(r saas_client.ApiCreateSubscriptionAsyncRequest) (*http.Response, error)
func (*MockSubscriptionOperationsConsumer) DeleteSubscriptionAsync ¶
func (m *MockSubscriptionOperationsConsumer) DeleteSubscriptionAsync(ctx context.Context, appName string) saas_client.ApiDeleteSubscriptionAsyncRequest
func (*MockSubscriptionOperationsConsumer) DeleteSubscriptionAsyncExecute ¶
func (m *MockSubscriptionOperationsConsumer) DeleteSubscriptionAsyncExecute(r saas_client.ApiDeleteSubscriptionAsyncRequest) (*http.Response, error)
func (*MockSubscriptionOperationsConsumer) DeleteSubscriptionLabels ¶
func (m *MockSubscriptionOperationsConsumer) DeleteSubscriptionLabels(ctx context.Context, appName string) saas_client.ApiDeleteSubscriptionLabelsRequest
func (*MockSubscriptionOperationsConsumer) DeleteSubscriptionLabelsExecute ¶
func (m *MockSubscriptionOperationsConsumer) DeleteSubscriptionLabelsExecute(r saas_client.ApiDeleteSubscriptionLabelsRequest) (*saas_client.LabelsResponseObject, *http.Response, error)
func (*MockSubscriptionOperationsConsumer) GetEntitledApplication ¶
func (m *MockSubscriptionOperationsConsumer) GetEntitledApplication(ctx context.Context, appName string) saas_client.ApiGetEntitledApplicationRequest
func (*MockSubscriptionOperationsConsumer) GetEntitledApplicationExecute ¶
func (m *MockSubscriptionOperationsConsumer) GetEntitledApplicationExecute(r saas_client.ApiGetEntitledApplicationRequest) (*saas_client.EntitledApplicationsResponseObject, *http.Response, error)
func (*MockSubscriptionOperationsConsumer) GetEntitledApplications ¶
func (m *MockSubscriptionOperationsConsumer) GetEntitledApplications(ctx context.Context) saas_client.ApiGetEntitledApplicationsRequest
func (*MockSubscriptionOperationsConsumer) GetEntitledApplicationsExecute ¶
func (m *MockSubscriptionOperationsConsumer) GetEntitledApplicationsExecute(r saas_client.ApiGetEntitledApplicationsRequest) (*saas_client.EntitledApplicationsResponseCollection, *http.Response, error)
func (*MockSubscriptionOperationsConsumer) GetSubscriptionLabels ¶
func (m *MockSubscriptionOperationsConsumer) GetSubscriptionLabels(ctx context.Context, appName string) saas_client.ApiGetSubscriptionLabelsRequest
func (*MockSubscriptionOperationsConsumer) GetSubscriptionLabelsExecute ¶
func (m *MockSubscriptionOperationsConsumer) GetSubscriptionLabelsExecute(r saas_client.ApiGetSubscriptionLabelsRequest) (*saas_client.LabelsResponseObject, *http.Response, error)
func (*MockSubscriptionOperationsConsumer) UpdateSubscriptionParametersAsync ¶
func (m *MockSubscriptionOperationsConsumer) UpdateSubscriptionParametersAsync(ctx context.Context, appName string) saas_client.ApiUpdateSubscriptionParametersAsyncRequest
func (*MockSubscriptionOperationsConsumer) UpdateSubscriptionParametersAsyncExecute ¶
func (m *MockSubscriptionOperationsConsumer) UpdateSubscriptionParametersAsyncExecute(r saas_client.ApiUpdateSubscriptionParametersAsyncRequest) (*http.Response, error)
func (*MockSubscriptionOperationsConsumer) UpsertSubscriptionLabels ¶
func (m *MockSubscriptionOperationsConsumer) UpsertSubscriptionLabels(ctx context.Context, appName string) saas_client.ApiUpsertSubscriptionLabelsRequest
func (*MockSubscriptionOperationsConsumer) UpsertSubscriptionLabelsExecute ¶
func (m *MockSubscriptionOperationsConsumer) UpsertSubscriptionLabelsExecute(r saas_client.ApiUpsertSubscriptionLabelsRequest) (*saas_client.LabelsResponseObject, *http.Response, error)
type SubscriptionApiHandler ¶
type SubscriptionApiHandler struct {
// contains filtered or unexported fields
}
func NewSubscriptionApiHandler ¶
func NewSubscriptionApiHandler(ctx context.Context, clientId string, clientSecret string, tokenUrl string, serviceUrl string) *SubscriptionApiHandler
NewSubscriptionApiHandler Creates instance of ApiHandler implementation
func (*SubscriptionApiHandler) CreateSubscription ¶
func (s *SubscriptionApiHandler) CreateSubscription(ctx context.Context, subPost SubscriptionPost) (string, error)
func (*SubscriptionApiHandler) DeleteSubscription ¶
func (s *SubscriptionApiHandler) DeleteSubscription(ctx context.Context, externalName string) error
func (*SubscriptionApiHandler) GetSubscription ¶
func (s *SubscriptionApiHandler) GetSubscription(ctx context.Context, externalName string) (*SubscriptionGet, error)
func (*SubscriptionApiHandler) UpdateSubscription ¶
func (s *SubscriptionApiHandler) UpdateSubscription(ctx context.Context, externalName string, subPut SubscriptionPut) error
type SubscriptionApiHandlerI ¶
type SubscriptionApiHandlerI interface { CreateSubscription(ctx context.Context, payload SubscriptionPost) (string, error) UpdateSubscription(ctx context.Context, externalName string, payload SubscriptionPut) error DeleteSubscription(ctx context.Context, externalName string) error GetSubscription(ctx context.Context, externalName string) (*SubscriptionGet, error) }
SubscriptionApiHandlerI interface that abstracts all API client operations that have to be exposed towards controller represents basic Rest CRUD operations
type SubscriptionGet ¶
type SubscriptionGet = saas_client.EntitledApplicationsResponseObject
SubscriptionGet generic Get type that could be autogenerated, can be alias of existing client implementations value object
type SubscriptionPost ¶
type SubscriptionPost struct { saas_client.CreateSubscriptionRequestPayload // contains filtered or unexported fields }
SubscriptionPost generic Post type that could be autogenerated, here encapsulate existing api client type along with additional appName that is required for POST operation
type SubscriptionPut ¶
type SubscriptionPut struct { saas_client.UpdateSubscriptionRequestPayload // contains filtered or unexported fields }
SubscriptionPut generic Post type that could be autogenerated, here encapsulate existing api client type along with additional appName that is required for PUT operation
type SubscriptionTypeMapper ¶
type SubscriptionTypeMapper struct { }
func NewSubscriptionTypeMapper ¶
func NewSubscriptionTypeMapper() *SubscriptionTypeMapper
func (*SubscriptionTypeMapper) ConvertToCreatePayload ¶
func (s *SubscriptionTypeMapper) ConvertToCreatePayload(cr *v1alpha1.Subscription) SubscriptionPost
func (*SubscriptionTypeMapper) ConvertToUpdatePayload ¶
func (s *SubscriptionTypeMapper) ConvertToUpdatePayload(cr *v1alpha1.Subscription) SubscriptionPut
func (*SubscriptionTypeMapper) IsAvailable ¶
func (s *SubscriptionTypeMapper) IsAvailable(cr *v1alpha1.Subscription) bool
func (*SubscriptionTypeMapper) IsUpToDate ¶
func (s *SubscriptionTypeMapper) IsUpToDate(cr *v1alpha1.Subscription, get *SubscriptionGet) bool
func (*SubscriptionTypeMapper) SyncStatus ¶
func (s *SubscriptionTypeMapper) SyncStatus(get *SubscriptionGet, crStatus *v1alpha1.SubscriptionObservation)
type SubscriptionTypeMapperI ¶
type SubscriptionTypeMapperI interface { // ConvertToCreatePayload maps a given CR to a API Post object (mostly payload, but might include addtional metadata) ConvertToCreatePayload(cr *v1alpha1.Subscription) SubscriptionPost // ConvertToUpdatePayload maps a given CR to a API Put object (mostly payload, but might include addtional metadata) ConvertToUpdatePayload(cr *v1alpha1.Subscription) SubscriptionPut // IsUpToDate compares a given CR with the external API representation, returns whether updates towards the API are required or not IsUpToDate(cr *v1alpha1.Subscription, get *SubscriptionGet) bool // IsAvailable allow additional check for whether a CR is fully available or not, maps to ready condition in controller, might be used for checking an observed API state field IsAvailable(cr *v1alpha1.Subscription) bool // SyncStatus allows to pull some data from external API resource towards the CR status SyncStatus(get *SubscriptionGet, crStatus *v1alpha1.SubscriptionObservation) }
SubscriptionTypeMapperI interface to encapsulate all domain logic for making the controller work with otherwise unknown API and its types