osbapi

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreGone added in v0.14.0

func IgnoreGone(err error) error

func IsUnrecoveralbeError added in v0.14.0

func IsUnrecoveralbeError(err error) bool

Types

type Assets added in v0.14.0

type Assets struct {
	// contains filtered or unexported fields
}

func NewAssets added in v0.14.0

func NewAssets(k8sClient client.Client, rootNamespace string) *Assets

func (*Assets) GetServiceBindingAssets added in v0.14.0

func (r *Assets) GetServiceBindingAssets(ctx context.Context, serviceBinding *korifiv1alpha1.CFServiceBinding) (ServiceBindingAssets, error)

func (*Assets) GetServiceInstanceAssets added in v0.14.0

func (r *Assets) GetServiceInstanceAssets(ctx context.Context, serviceInstance *korifiv1alpha1.CFServiceInstance) (ServiceInstanceAssets, error)

type BindPayload added in v0.14.0

type BindPayload struct {
	BindingID  string
	InstanceID string
	BindRequest
}

type BindRequest added in v0.14.0

type BindRequest struct {
	ServiceId    string         `json:"service_id"`
	PlanID       string         `json:"plan_id"`
	AppGUID      string         `json:"app_guid"`
	BindResource BindResource   `json:"bind_resource"`
	Parameters   map[string]any `json:"parameters"`
}

type BindResource added in v0.14.0

type BindResource struct {
	AppGUID string `json:"app_guid"`
}

type BindResponse added in v0.14.0

type BindResponse struct {
	Credentials map[string]any `json:"credentials"`
	Operation   string         `json:"operation"`
	IsAsync     bool
}

type BindingResponse added in v0.15.0

type BindingResponse struct {
	Parameters map[string]any `json:"parameters"`
}

type Broker

type Broker struct {
	URL      string
	Username string
	Password string
}

type BrokerClientFactory

type BrokerClientFactory interface {
	CreateClient(context.Context, *korifiv1alpha1.CFServiceBroker) (BrokerClient, error)
}

type Catalog

type Catalog struct {
	Services []Service `json:"services"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(broker Broker, httpClient *http.Client) *Client

func (*Client) Bind added in v0.14.0

func (c *Client) Bind(ctx context.Context, payload BindPayload) (BindResponse, error)

func (*Client) Deprovision

func (c *Client) Deprovision(ctx context.Context, payload DeprovisionPayload) (ProvisionResponse, error)

func (*Client) GetCatalog

func (c *Client) GetCatalog(ctx context.Context) (Catalog, error)

func (*Client) GetServiceBinding added in v0.15.0

func (c *Client) GetServiceBinding(ctx context.Context, payload BindPayload) (BindingResponse, error)

func (*Client) GetServiceBindingLastOperation added in v0.14.0

func (c *Client) GetServiceBindingLastOperation(ctx context.Context, request GetBindingLastOperationRequest) (LastOperationResponse, error)

func (*Client) GetServiceInstanceLastOperation

func (c *Client) GetServiceInstanceLastOperation(ctx context.Context, request GetInstanceLastOperationRequest) (LastOperationResponse, error)

func (*Client) Provision

func (c *Client) Provision(ctx context.Context, payload ProvisionPayload) (ProvisionResponse, error)

func (*Client) Unbind added in v0.14.0

func (c *Client) Unbind(ctx context.Context, payload UnbindPayload) (UnbindResponse, error)

type ClientFactory

type ClientFactory struct {
	// contains filtered or unexported fields
}

func NewClientFactory

func NewClientFactory(k8sClient client.Client, trustInsecureBrokers bool) *ClientFactory

func (*ClientFactory) CreateClient

func (f *ClientFactory) CreateClient(ctx context.Context, cfServiceBroker *korifiv1alpha1.CFServiceBroker) (BrokerClient, error)

type DeprovisionPayload added in v0.14.0

type DeprovisionPayload struct {
	ID string
	DeprovisionRequestParamaters
}

type DeprovisionRequestParamaters added in v0.14.0

type DeprovisionRequestParamaters struct {
	ServiceId string `json:"service_id"`
	PlanID    string `json:"plan_id"`
}

type GetBindingLastOperationRequest added in v0.14.0

type GetBindingLastOperationRequest struct {
	InstanceID string
	BindingID  string
	GetLastOperationRequestParameters
}

type GetBindingRequest added in v0.14.0

type GetBindingRequest struct {
	InstanceID string
	BindingID  string
	ServiceId  string
	PlanID     string
}

type GetBindingResponse added in v0.14.0

type GetBindingResponse struct {
	Credentials map[string]any `json:"credentials"`
}

type GetInstanceLastOperationRequest added in v0.14.0

type GetInstanceLastOperationRequest struct {
	InstanceID string
	GetLastOperationRequestParameters
}

type GetLastOperationRequestParameters added in v0.14.0

type GetLastOperationRequestParameters struct {
	ServiceId string
	PlanID    string
	Operation string
}

type GoneError

type GoneError struct{}

func (GoneError) Error

func (g GoneError) Error() string

type InputParameterSchema added in v0.15.0

type InputParameterSchema struct {
	Parameters map[string]any `json:"parameters,omitempty"`
}

type LastOperationResponse

type LastOperationResponse struct {
	State       LastOperationResponseState `json:"state"`
	Description string                     `json:"description"`
}

type LastOperationResponseState added in v0.14.0

type LastOperationResponseState string

func (LastOperationResponseState) Value added in v0.14.0

type MaintenanceInfo added in v0.15.0

type MaintenanceInfo struct {
	Version string `json:"version"`
}

type Plan

type Plan struct {
	ID               string             `json:"id"`
	Name             string             `json:"name"`
	Description      string             `json:"description"`
	Metadata         map[string]any     `json:"metadata"`
	Free             bool               `json:"free"`
	Bindable         bool               `json:"bindable"`
	BindingRotatable bool               `json:"binding_rotatable"`
	PlanUpdateable   bool               `json:"plan_updateable"`
	Schemas          ServicePlanSchemas `json:"schemas"`
	MaintenanceInfo  MaintenanceInfo    `json:"maintenance_info"`
}

type ProvisionPayload added in v0.14.0

type ProvisionPayload struct {
	InstanceID string
	ProvisionRequest
}

type ProvisionRequest added in v0.14.0

type ProvisionRequest struct {
	ServiceId  string         `json:"service_id"`
	PlanID     string         `json:"plan_id"`
	SpaceGUID  string         `json:"space_guid"`
	OrgGUID    string         `json:"organization_guid"`
	Parameters map[string]any `json:"parameters"`
}

type ProvisionResponse added in v0.14.0

type ProvisionResponse struct {
	IsAsync   bool
	Operation string `json:"operation,omitempty"`
}

type Service

type Service struct {
	ID                   string         `json:"id"`
	Name                 string         `json:"name"`
	Description          string         `json:"description"`
	Tags                 []string       `json:"tags"`
	Requires             []string       `json:"requires"`
	Metadata             map[string]any `json:"metadata"`
	PlanUpdateable       bool           `json:"plan_updateable"`
	Bindable             bool           `json:"bindable"`
	InstancesRetrievable bool           `json:"instances_retrievable"`
	BindingsRetrievable  bool           `json:"bindings_retrievable"`
	AllowContextUpdates  bool           `json:"allow_context_updates"`
	DashboardClient      struct {
		Id          string `json:"id"`
		Secret      string `json:"secret"`
		RedirectUri string `json:"redirect_url"`
	} `json:"dashboard_client"`
	Plans []Plan `json:"plans"`
}

type ServiceBindingAssets added in v0.14.0

type ServiceBindingAssets struct {
	ServiceInstanceAssets
	ServiceInstance *korifiv1alpha1.CFServiceInstance
}

type ServiceBindingSchema added in v0.15.0

type ServiceBindingSchema struct {
	Create InputParameterSchema `json:"create"`
}

type ServiceInstanceAssets added in v0.14.0

type ServiceInstanceAssets struct {
	ServiceBroker   *korifiv1alpha1.CFServiceBroker
	ServiceOffering *korifiv1alpha1.CFServiceOffering
	ServicePlan     *korifiv1alpha1.CFServicePlan
}

type ServiceInstanceSchema added in v0.15.0

type ServiceInstanceSchema struct {
	Create InputParameterSchema `json:"create"`
	Update InputParameterSchema `json:"update"`
}

type ServicePlanSchemas added in v0.15.0

type ServicePlanSchemas struct {
	ServiceInstance ServiceInstanceSchema `json:"service_instance"`
	ServiceBinding  ServiceBindingSchema  `json:"service_binding"`
}

type UnbindPayload added in v0.14.0

type UnbindPayload struct {
	BindingID  string
	InstanceID string
	UnbindRequestParameters
}

type UnbindRequestParameters added in v0.14.0

type UnbindRequestParameters struct {
	ServiceId string
	PlanID    string
}

type UnbindResponse added in v0.14.0

type UnbindResponse struct {
	IsAsync   bool
	Operation string `json:"operation,omitempty"`
}

func (UnbindResponse) IsComplete added in v0.14.0

func (r UnbindResponse) IsComplete() bool

type UnrecoverableError added in v0.14.0

type UnrecoverableError struct {
	Status int
}

func (UnrecoverableError) Error added in v0.14.0

func (c UnrecoverableError) Error() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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