director

package
v0.0.0-...-cc7cbc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGQLNotFoundError

func IsGQLNotFoundError(err error) bool

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

APIPackageInstanceAuthClient defines required Director client functionality to handle the package instance auth creation and deletion

type FindPackageInstanceAuthInput

type FindPackageInstanceAuthInput struct {
	PackageID      string `valid:"required"`
	ApplicationID  string `valid:"required"`
	InstanceAuthID string `valid:"required"`
}

type FindPackageInstanceAuthOutput

type FindPackageInstanceAuthOutput struct {
	InstanceAuth *schema.PackageInstanceAuth `json:"result"`
}

type FindPackageInstanceAuthsInput

type FindPackageInstanceAuthsInput struct {
	ApplicationID string `valid:"required"`
	PackageID     string `valid:"required"`
}

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

type GraphQLClient

type GraphQLClient interface {
	Run(ctx context.Context, req *gcli.Request, resp interface{}) error
}

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 RequestPackageInstanceAuthInput

type RequestPackageInstanceAuthInput struct {
	PackageID   string `valid:"required"`
	Context     Values
	InputSchema Values
}

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

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

type ServiceConfig

type ServiceConfig struct {
	OperationPollingTimeout  time.Duration `default:"20m"`
	OperationPollingInterval time.Duration `default:"1m"`
}

type Values

type Values map[string]interface{}

func (*Values) MarshalToQGLJSON

func (r *Values) MarshalToQGLJSON() (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL