Documentation
¶
Index ¶
- func GetByIDOrSpec(ctx context.Context, c *Client, guid string, ...) (*resource.ServiceInstance, error)
- func IsUpToDate(in *v1alpha1.ServiceInstanceParameters, observed *resource.ServiceInstance) bool
- func LateInitialize(p *v1alpha1.ServicePlanParameters, r *resource.ServiceInstance)
- func UpdateObservation(in *v1alpha1.ServiceInstanceObservation, r *resource.ServiceInstance)
- type Client
- func (c *Client) Create(ctx context.Context, spec v1alpha1.ServiceInstanceParameters, ...) (*resource.ServiceInstance, error)
- func (c *Client) Delete(ctx context.Context, cr *v1alpha1.ServiceInstance) error
- func (c *Client) Get(ctx context.Context, guid string) (*resource.ServiceInstance, error)
- func (c *Client) GetServiceCredentials(ctx context.Context, r *resource.ServiceInstance) (json.RawMessage, error)
- func (c *Client) MatchSingle(ctx context.Context, spec v1alpha1.ServiceInstanceParameters) (*resource.ServiceInstance, error)
- func (c *Client) Update(ctx context.Context, guid string, desired *v1alpha1.ServiceInstanceParameters, ...) (*resource.ServiceInstance, error)
- type Job
- type ServiceInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetByIDOrSpec ¶
func GetByIDOrSpec(ctx context.Context, c *Client, guid string, spec v1alpha1.ServiceInstanceParameters) (*resource.ServiceInstance, error)
GetByIDOrSpec retrieves external resource by GUID or by matching CR's ForProvider spec
func IsUpToDate ¶
func IsUpToDate(in *v1alpha1.ServiceInstanceParameters, observed *resource.ServiceInstance) bool
IsUpToDate checks if the managed resource is in sync with CR.
func LateInitialize ¶
func LateInitialize(p *v1alpha1.ServicePlanParameters, r *resource.ServiceInstance)
LateInitialize populates EMPTY parameters based on the observed managed resource properties
func UpdateObservation ¶
func UpdateObservation(in *v1alpha1.ServiceInstanceObservation, r *resource.ServiceInstance)
UpdateObservation updates CR status based on the observed managed resource status
Types ¶
type Client ¶
type Client struct {
ServiceInstance
Job
}
Client operates on ServiceInstance resources and uses Job to poll async operations.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, spec v1alpha1.ServiceInstanceParameters, creds json.RawMessage) (*resource.ServiceInstance, error)
Create creates the external resource according to CR's ForProvider spec
func (*Client) GetServiceCredentials ¶
func (c *Client) GetServiceCredentials(ctx context.Context, r *resource.ServiceInstance) (json.RawMessage, error)
GetServiceCredentials retrieves service instance credentials
func (*Client) MatchSingle ¶
func (c *Client) MatchSingle(ctx context.Context, spec v1alpha1.ServiceInstanceParameters) (*resource.ServiceInstance, error)
MatchSingle retrieves external resource by matching CR's ForProvider spec
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, guid string, desired *v1alpha1.ServiceInstanceParameters, creds json.RawMessage) (*resource.ServiceInstance, error)
Update updates the external resource to keep it in sync with CR's ForProvider spec
type ServiceInstance ¶
type ServiceInstance interface {
Get(context.Context, string) (*resource.ServiceInstance, error)
GetManagedParameters(context.Context, string) (*json.RawMessage, error)
GetUserProvidedCredentials(context.Context, string) (*json.RawMessage, error)
Single(context.Context, *client.ServiceInstanceListOptions) (*resource.ServiceInstance, error)
CreateManaged(context.Context, *resource.ServiceInstanceManagedCreate) (string, error)
UpdateManaged(context.Context, string, *resource.ServiceInstanceManagedUpdate) (string, *resource.ServiceInstance, error)
CreateUserProvided(context.Context, *resource.ServiceInstanceUserProvidedCreate) (*resource.ServiceInstance, error)
UpdateUserProvided(context.Context, string, *resource.ServiceInstanceUserProvidedUpdate) (*resource.ServiceInstance, error)
Delete(context.Context, string) (string, error)
}
ServiceInstance defines interfaces to the ServiceInstance resource