Documentation ¶
Index ¶
- Variables
- type BrokerConfig
- type GCPServiceBroker
- func (gcpBroker *GCPServiceBroker) Bind(ctx context.Context, instanceID, bindingID string, ...) (brokerapi.Binding, error)
- func (gcpBroker *GCPServiceBroker) Deprovision(ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, ...) (response brokerapi.DeprovisionServiceSpec, err error)
- func (gcpBroker *GCPServiceBroker) LastOperation(ctx context.Context, instanceID, operationData string) (brokerapi.LastOperation, error)
- func (gcpBroker *GCPServiceBroker) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, ...) (brokerapi.ProvisionedServiceSpec, error)
- func (gcpBroker *GCPServiceBroker) Services(ctx context.Context) ([]brokerapi.Service, error)
- func (gcpBroker *GCPServiceBroker) Unbind(ctx context.Context, instanceID, bindingID string, ...) error
- func (gcpBroker *GCPServiceBroker) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, ...) (brokerapi.UpdateServiceSpec, error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidUserInput = brokerapi.NewFailureResponse(errors.New(invalidUserInputMsg), http.StatusBadRequest, "parsing-user-request")
)
Functions ¶
This section is empty.
Types ¶
type BrokerConfig ¶
type BrokerConfig struct { HttpConfig *jwt.Config ProjectId string Registry broker.BrokerRegistry }
func NewBrokerConfigFromEnv ¶
func NewBrokerConfigFromEnv() (*BrokerConfig, error)
type GCPServiceBroker ¶
GCPServiceBroker is a brokerapi.ServiceBroker that can be used to generate an OSB compatible service broker.
func New ¶
func New(cfg *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) (response brokerapi.DeprovisionServiceSpec, err 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. If a deprovision is asynchronous, the returned DeprovisionServiceSpec will contain the operation ID for tracking its progress.
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 ¶
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 |
---|---|
broker_basefakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |