brokers

package
v4.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCPServiceBroker

type GCPServiceBroker struct {
	Catalog          map[string]models.Service
	ServiceBrokerMap map[string]models.ServiceBrokerHelper

	Logger lager.Logger
}

GCPServiceBroker is a brokerapi.ServiceBroker that can be used to generate an OSB compatible service broker.

func New

func New(cfg *config.BrokerConfig, logger lager.Logger) (*GCPServiceBroker, error)

New creates a GCPServiceBroker. Exactly one of GCPServiceBroker or error will be nil when returned.

func (*GCPServiceBroker) Bind

func (gcpBroker *GCPServiceBroker) Bind(ctx context.Context, instanceID, bindingID string, details brokerapi.BindDetails) (brokerapi.Binding, error)

Bind creates an account with credentials to access an instance of a service. It is bound to the `PUT /v2/service_instances/:instance_id/service_bindings/:binding_id` endpoint and can be called using the `cf bind-service` command.

func (*GCPServiceBroker) Deprovision

func (gcpBroker *GCPServiceBroker) Deprovision(ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, clientSupportsAsync bool) (brokerapi.DeprovisionServiceSpec, error)

Deprovision destroys an existing instance of a service. It is bound to the `DELETE /v2/service_instances/:instance_id` endpoint and can be called using the `cf delete-service` command.

func (*GCPServiceBroker) LastOperation

func (gcpBroker *GCPServiceBroker) LastOperation(ctx context.Context, instanceID, operationData string) (brokerapi.LastOperation, error)

Unbind destroys an account and credentials with access to an instance of a service. It is bound to the `GET /v2/service_instances/:instance_id/last_operation` endpoint. It is called by `cf create-service` or `cf delete-service` if the operation was asynchronous.

func (*GCPServiceBroker) Provision

func (gcpBroker *GCPServiceBroker) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, clientSupportsAsync bool) (brokerapi.ProvisionedServiceSpec, error)

Provision creates a new instance of a service. It is bound to the `PUT /v2/service_instances/:instance_id` endpoint and can be called using the `cf create-service` command.

func (*GCPServiceBroker) Services

func (gcpBroker *GCPServiceBroker) Services(ctx context.Context) ([]brokerapi.Service, error)

Services lists services in the broker's catalog. It is called through the `GET /v2/catalog` endpoint or the `cf marketplace` command.

func (*GCPServiceBroker) Unbind

func (gcpBroker *GCPServiceBroker) Unbind(ctx context.Context, instanceID, bindingID string, details brokerapi.UnbindDetails) error

Unbind destroys an account and credentials with access to an instance of a service. It is bound to the `DELETE /v2/service_instances/:instance_id/service_bindings/:binding_id` endpoint and can be called using the `cf unbind-service` command.

func (*GCPServiceBroker) Update

func (gcpBroker *GCPServiceBroker) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, asyncAllowed bool) (brokerapi.UpdateServiceSpec, error)

Update a service instance plan. This functionality is not implemented and will return an error indicating that plan changes are not supported.

Directories

Path Synopsis
modelsfakes
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