Documentation ¶
Index ¶
- func IsGQLNotFoundError(err error) bool
- type APIPackageInstanceAuthClient
- type FindPackageInstanceAuthInput
- type FindPackageInstanceAuthOutput
- type FindPackageInstanceAuthsInput
- type FindPackageInstanceAuthsOutput
- type GQLClient
- func (r *GQLClient) FindPackageInstanceAuth(ctx context.Context, in FindPackageInstanceAuthInput) (*FindPackageInstanceAuthOutput, error)
- func (r *GQLClient) FindPackageInstanceAuths(ctx context.Context, in FindPackageInstanceAuthsInput) (*FindPackageInstanceAuthsOutput, error)
- func (r *GQLClient) RequestPackageInstanceAuth(ctx context.Context, in RequestPackageInstanceAuthInput) (*RequestPackageInstanceAuthOutput, error)
- func (r *GQLClient) RequestPackageInstanceAuthDeletion(ctx context.Context, in RequestPackageInstanceAuthDeletionInput) (*RequestPackageInstanceAuthDeletionOutput, error)
- type GraphQLClient
- type NothingDoerService
- func (s *NothingDoerService) EnsureAPIPackageCredentials(_ context.Context, _, _, _ string, _ map[string]interface{}) error
- func (s *NothingDoerService) EnsureAPIPackageCredentialsDeleted(_ context.Context, _ string, _ string, _ string) error
- func (s *NothingDoerService) GetAPIPackageCredentials(_ context.Context, _, _, _ string) (internal.APIPackageCredential, error)
- type RequestPackageInstanceAuthDeletionInput
- type RequestPackageInstanceAuthDeletionOutput
- type RequestPackageInstanceAuthInput
- type RequestPackageInstanceAuthOutput
- type Service
- func (s *Service) EnsureAPIPackageCredentials(ctx context.Context, appID, pkgID, instanceID string, ...) error
- func (s *Service) EnsureAPIPackageCredentialsDeleted(ctx context.Context, appID string, pkgID string, instanceID string) error
- func (s *Service) GetAPIPackageCredentials(ctx context.Context, appID, pkgID, instanceID string) (internal.APIPackageCredential, error)
- type ServiceConfig
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGQLNotFoundError ¶
IsGQLNotFoundError checks if graphql response error represents not found error.
This is so funny that I had to write such piece of code. DON'T TRY THIS AT HOME
Fortunately there is a light at the end of the tunnel, check https://github.com/kyma-incubator/compass/issues/66
Types ¶
type APIPackageInstanceAuthClient ¶
type APIPackageInstanceAuthClient interface { RequestPackageInstanceAuth(context.Context, RequestPackageInstanceAuthInput) (*RequestPackageInstanceAuthOutput, error) FindPackageInstanceAuths(context.Context, FindPackageInstanceAuthsInput) (*FindPackageInstanceAuthsOutput, error) FindPackageInstanceAuth(context.Context, FindPackageInstanceAuthInput) (*FindPackageInstanceAuthOutput, error) RequestPackageInstanceAuthDeletion(context.Context, RequestPackageInstanceAuthDeletionInput) (*RequestPackageInstanceAuthDeletionOutput, error) }
APIPackageInstanceAuthClient defines required Director client functionality to handle the package instance auth creation and deletion
type FindPackageInstanceAuthOutput ¶
type FindPackageInstanceAuthOutput struct {
InstanceAuth *schema.PackageInstanceAuth `json:"result"`
}
type FindPackageInstanceAuthsOutput ¶
type FindPackageInstanceAuthsOutput struct {
InstanceAuths []*schema.PackageInstanceAuth
}
type GQLClient ¶
type GQLClient struct {
// contains filtered or unexported fields
}
func NewQGLClient ¶
func NewQGLClient(cli GraphQLClient) *GQLClient
func (*GQLClient) FindPackageInstanceAuth ¶
func (r *GQLClient) FindPackageInstanceAuth(ctx context.Context, in FindPackageInstanceAuthInput) (*FindPackageInstanceAuthOutput, error)
func (*GQLClient) FindPackageInstanceAuths ¶
func (r *GQLClient) FindPackageInstanceAuths(ctx context.Context, in FindPackageInstanceAuthsInput) (*FindPackageInstanceAuthsOutput, error)
func (*GQLClient) RequestPackageInstanceAuth ¶
func (r *GQLClient) RequestPackageInstanceAuth(ctx context.Context, in RequestPackageInstanceAuthInput) (*RequestPackageInstanceAuthOutput, error)
func (*GQLClient) RequestPackageInstanceAuthDeletion ¶
func (r *GQLClient) RequestPackageInstanceAuthDeletion(ctx context.Context, in RequestPackageInstanceAuthDeletionInput) (*RequestPackageInstanceAuthDeletionOutput, error)
type GraphQLClient ¶
type NothingDoerService ¶
type NothingDoerService struct {
// contains filtered or unexported fields
}
NothingDoerService is a wrapper around the Director GraphQL client to support business logic
func NewNothingDoerService ¶
func NewNothingDoerService() *NothingDoerService
NewNothingDoerService returns new NothingDoerService instance
func (*NothingDoerService) EnsureAPIPackageCredentials ¶
func (s *NothingDoerService) EnsureAPIPackageCredentials(_ context.Context, _, _, _ string, _ map[string]interface{}) error
EnsureAPIPackageCredentials ensures that the API Package credentials were created for the given service instance ID
func (*NothingDoerService) EnsureAPIPackageCredentialsDeleted ¶
func (s *NothingDoerService) EnsureAPIPackageCredentialsDeleted(_ context.Context, _ string, _ string, _ string) error
EnsureAPIPackageCredentialsDeleted ensures that the given API Package credential associated with the given service instance id is removed.
func (*NothingDoerService) GetAPIPackageCredentials ¶
func (s *NothingDoerService) GetAPIPackageCredentials(_ context.Context, _, _, _ string) (internal.APIPackageCredential, error)
GetAPIPackageCredentials returns API Package credentials associated with the given service instance id
type RequestPackageInstanceAuthDeletionInput ¶
type RequestPackageInstanceAuthDeletionInput struct {
InstanceAuthID string `valid:"required"`
}
type RequestPackageInstanceAuthDeletionOutput ¶
type RequestPackageInstanceAuthDeletionOutput struct { ID string `json:"id"` Status schema.PackageInstanceAuthStatus `json:"status"` }
type RequestPackageInstanceAuthOutput ¶
type RequestPackageInstanceAuthOutput struct {
InstanceAuth schema.PackageInstanceAuth `json:"result"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a wrapper around the Director GraphQL client to support business logic
func NewService ¶
func NewService(cli APIPackageInstanceAuthClient, cfg ServiceConfig) *Service
NewService returns new Service instance
func (*Service) EnsureAPIPackageCredentials ¶
func (s *Service) EnsureAPIPackageCredentials(ctx context.Context, appID, pkgID, instanceID string, inputSchema map[string]interface{}) error
EnsureAPIPackageCredentials ensures that the API Package credentials were created for the given service instance ID
func (*Service) EnsureAPIPackageCredentialsDeleted ¶
func (s *Service) EnsureAPIPackageCredentialsDeleted(ctx context.Context, appID string, pkgID string, instanceID string) error
EnsureAPIPackageCredentialsDeleted ensures that the given API Package credential associated with the given service instance id is removed.
func (*Service) GetAPIPackageCredentials ¶
func (s *Service) GetAPIPackageCredentials(ctx context.Context, appID, pkgID, instanceID string) (internal.APIPackageCredential, error)
GetAPIPackageCredentials returns API Package credentials associated with the given service instance id