serviceinstance

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetByIDOrSpec

GetByIDOrSpec retrieves external resource by GUID or by matching CR's ForProvider spec

func IsUpToDate

IsUpToDate checks if the managed resource is in sync with CR.

func LateInitialize

LateInitialize populates EMPTY parameters based on the observed managed resource properties

func UpdateObservation

UpdateObservation updates CR status based on the observed managed resource status

Types

type Client

type Client struct {
	ServiceInstance
	Job
	ServicePlanResolver
}

Client operates on ServiceInstance resources and uses Job to poll async operations.

func NewClient

func NewClient(cf *client.Client) *Client

NewClient creates a new client instance from a cfclient.ServiceInstance instance.

func (*Client) Create

Create creates the external resource according to CR's ForProvider spec

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, cr *v1alpha1.ServiceInstance) error

Delete deletes a service instance managed by the CR

func (*Client) Get

func (c *Client) Get(ctx context.Context, guid string) (*resource.ServiceInstance, error)

Get retrieves external resource using GUID

func (*Client) GetServiceCredentials

func (c *Client) GetServiceCredentials(ctx context.Context, r *resource.ServiceInstance) (json.RawMessage, error)

GetServiceCredentials retrieves service instance credentials

func (*Client) MatchSingle

MatchSingle retrieves external resource by matching CR's ForProvider spec

func (*Client) ResolveServicePlan added in v1.0.0

func (c *Client) ResolveServicePlan(ctx context.Context, kube k8s.Client, cr *v1alpha1.ServiceInstance) error

We either populate/update the service plan ID with the external resource GUID based on the specified offering and plan or we use the provided ID directly.

func (*Client) Update

Update updates the external resource to keep it in sync with CR's ForProvider spec

type Job

type Job interface {
	PollComplete(context.Context, string, *client.PollingOptions) error
}

Job defines interfaces to async operations/jobs.

type ServicePlan added in v1.0.0

type ServicePlan interface {
	Get(ctx context.Context, guid string) (*resource.ServicePlan, error)
	Single(ctx context.Context, opts *client.ServicePlanListOptions) (*resource.ServicePlan, error)
}

type ServicePlanResolver added in v1.0.0

type ServicePlanResolver interface {
	ServicePlan
}

Jump to

Keyboard shortcuts

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