Documentation ¶
Index ¶
- type BindRequest
- type BindResponse
- type Binder
- type Cataloger
- type DeprovisionRequest
- type DeprovisionResponse
- type Deprovisioner
- type ErrUnknownOperationState
- type Lifecycler
- type OperationState
- type OperationStatusRequest
- type OperationStatusResponse
- type OperationStatusRetriever
- type ProvisionRequest
- type ProvisionResponse
- type Provisioner
- type Service
- type ServiceBrokerSpec
- type ServiceInfo
- type ServicePlan
- type UnbindRequest
- type Unbinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindRequest ¶
type BindRequest struct { InstanceID string ServiceID string PlanID string BindingID string Parameters map[string]interface{} }
BindRequest represents a request to bind to a service instance.
type BindResponse ¶
type BindResponse struct {
Creds map[string]interface{}
}
BindResponse represents a response to a BindRequest. It contains a map of credentials and other connection details for a service instance.
type Binder ¶
type Binder interface { // Bind obtains valid credentials (and other connection details) for a service instance. Bind( ctx context.Context, serviceBrokerSpec ServiceBrokerSpec, req *BindRequest, ) (*BindResponse, error) }
Binder obtains valid credentials (and other connection details) for service instances.
type Cataloger ¶
type Cataloger interface { // List lists all the available services. List( ctx context.Context, serviceBrokerSpec ServiceBrokerSpec, ) ([]*Service, error) }
Cataloger lists all the available services.
type DeprovisionRequest ¶
type DeprovisionRequest struct { InstanceID string ServiceID string PlanID string AcceptsIncomplete bool Parameters map[string]interface{} }
DeprovisionRequest represents a request to deprovision a service instance.
type DeprovisionResponse ¶
DeprovisionResponse represents a response to a DeprovisionRequest.
type Deprovisioner ¶
type Deprovisioner interface { // Deprovision deprovisions a service instance. Deprovision( ctx context.Context, serviceBrokerSpec ServiceBrokerSpec, req *DeprovisionRequest, ) (*DeprovisionResponse, error) }
Deprovisioner deprovisions service instances.
type ErrUnknownOperationState ¶
type ErrUnknownOperationState string
ErrUnknownOperationState is an error indicating that a string is not a known operation state.
func (ErrUnknownOperationState) Error ¶
func (e ErrUnknownOperationState) Error() string
Error is the error interface implementation.
type Lifecycler ¶
type Lifecycler interface { Provisioner Deprovisioner Binder Unbinder OperationStatusRetriever }
Lifecycler is a composition of several more narrowly scoped interfaces. It's intended for use in passing to functions that require all functionality.
type OperationState ¶
type OperationState string
OperationState represents the state returned in a "get operation status" call. This type implements fmt.Stringer.
const ( // OperationStateSucceeded is the OperationState indicating that the operation has succeeded OperationStateSucceeded OperationState = "succeeded" // OperationStateFailed is the OperationState indicating that the operation has failed. OperationStateFailed OperationState = "failed" // OperationStateInProgress is the OperationState indicating that the operation is still in // progress. OperationStateInProgress OperationState = "in progress" // OperationStateGone is the OperationState indicating that the service broker has deleted the // service instance in question. In the case of async deprovisioning, this is an indicator of // success. OperationStateGone OperationState = "gone" )
func (OperationState) String ¶
func (l OperationState) String() string
String is the fmt.Stringer interface implementation.
type OperationStatusRequest ¶
type OperationStatusRequest struct { InstanceID string ServiceID string PlanID string Operation string }
OperationStatusRequest represents a request to query the status of an asynchronous operation that is pending completion by the backing service broker.
type OperationStatusResponse ¶
type OperationStatusResponse struct {
State string
}
OperationStatusResponse represents a response to a OperationStatusRequest.
func (*OperationStatusResponse) GetState ¶
func (o *OperationStatusResponse) GetState() (OperationState, error)
GetState returns the OperationState corresponding to a OperationStatusResponse instance's State attribute, or an error if that State attribute does not correspond to a valid OperationState.
type OperationStatusRetriever ¶
type OperationStatusRetriever interface { // GetOperationStatus fetches the status of an asynchronous operation that is pending completion. GetOperationStatus( ctx context.Context, serviceBrokerSpec ServiceBrokerSpec, req *OperationStatusRequest, ) (*OperationStatusResponse, error) }
OperationStatusRetriever fetches the status of an asynchronous operation that is pending completion.
type ProvisionRequest ¶
type ProvisionRequest struct { InstanceID string PlanID string ServiceID string AcceptsIncomplete bool Parameters map[string]interface{} }
ProvisionRequest represents a request to provision a service instance.
type ProvisionResponse ¶
ProvisionResponse represents a response to ProvisionRequest.
type Provisioner ¶
type Provisioner interface { // Provision provisions a service instance. Provision( ctx context.Context, serviceBrokerSpec ServiceBrokerSpec, req *ProvisionRequest, ) (*ProvisionResponse, error) }
Provisioner provisions services instances.
type Service ¶
type Service struct { ServiceInfo Plans []ServicePlan }
Service represents a requestable service.
type ServiceBrokerSpec ¶
type ServiceInfo ¶
ServiceInfo represents all ascpects of a requestable service, except for its ServicePlans.
type ServicePlan ¶
ServicePlan represents a specific configuration or variant of its parent Service.
type UnbindRequest ¶
UnbindRequest represents a request invalidate a consumer's credentials for a service instance.
type Unbinder ¶
type Unbinder interface { // Unbind invalidates the specified credentials. Unbind( ctx context.Context, serviceBrokerSpec ServiceBrokerSpec, req *UnbindRequest, ) error }
Unbinder invalidates credentials for service instances.