Documentation ¶
Index ¶
- Constants
- func GetBindingRequestFromJSON(jsonBytes []byte, bindingRequest *BindingRequest) error
- func GetBindingResponseFromJSON(jsonBytes []byte, bindingResponse *BindingResponse) error
- func GetProvisioningRequestFromJSON(jsonBytes []byte, provisioningRequest *ProvisioningRequest) error
- func GetUpdatingRequestFromJSON(jsonBytes []byte, updatingRequest *UpdatingRequest) error
- type BindingRequest
- type BindingResponse
- type ProvisioningRequest
- type Server
- type UpdatingPreviousValues
- type UpdatingRequest
Constants ¶
const ( // OperationProvisioning represents the "provisioning" operation OperationProvisioning = "provisioning" // OperationUpdating represents the "updating" operation OperationUpdating = "updating" // OperationDeprovisioning represents the "deprovisioning" operation OperationDeprovisioning = "deprovisioning" // OperationStateInProgress represents the state of an operation that is still // pending completion OperationStateInProgress = "in progress" // OperationStateSucceeded represents the state of an operation that has // completed successfully OperationStateSucceeded = "succeeded" // OperationStateFailed represents the state of an operation that has // failed OperationStateFailed = "failed" // OperationStateGone is a pseudo oepration state represting the "state" // of an operation against an entity that no longer exists OperationStateGone = "gone" )
Variables ¶
This section is empty.
Functions ¶
func GetBindingRequestFromJSON ¶
func GetBindingRequestFromJSON( jsonBytes []byte, bindingRequest *BindingRequest, ) error
GetBindingRequestFromJSON populates the given BindingRequest by unmarshalling the provided JSON []byte
func GetBindingResponseFromJSON ¶
func GetBindingResponseFromJSON( jsonBytes []byte, bindingResponse *BindingResponse, ) error
GetBindingResponseFromJSON returns a new BindingResponse unmarshalled from the provided JSON []byte
func GetProvisioningRequestFromJSON ¶
func GetProvisioningRequestFromJSON( jsonBytes []byte, provisioningRequest *ProvisioningRequest, ) error
GetProvisioningRequestFromJSON populates the given ProvisioningRequest by unmarshalling the provided JSON []byte
func GetUpdatingRequestFromJSON ¶
func GetUpdatingRequestFromJSON( jsonBytes []byte, updatingRequest *UpdatingRequest, ) error
GetUpdatingRequestFromJSON populates the given UpdatingRequest by unmarshalling the provided JSON []byte
Types ¶
type BindingRequest ¶
type BindingRequest struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters service.BindingParameters `json:"parameters"` }
BindingRequest represents a request to bind to a service
func (*BindingRequest) ToJSON ¶
func (b *BindingRequest) ToJSON() ([]byte, error)
ToJSON returns a []byte containing a JSON representation of the binding request
type BindingResponse ¶
type BindingResponse struct {
Credentials service.Credentials `json:"credentials"`
}
BindingResponse represents the response to a binding request
func (*BindingResponse) ToJSON ¶
func (b *BindingResponse) ToJSON() ([]byte, error)
ToJSON returns a []byte containing a JSON representation of the binding response
type ProvisioningRequest ¶
type ProvisioningRequest struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters service.ProvisioningParameters `json:"parameters"` }
ProvisioningRequest represents a request to provision a service
func (*ProvisioningRequest) ToJSON ¶
func (p *ProvisioningRequest) ToJSON() ([]byte, error)
ToJSON returns a []byte containing a JSON representation of the provisioning request
type Server ¶
type Server interface { // Start causes the api server to start serving HTTP requests. It will block // until an error occurs and will return that error. Start(context.Context) error }
Server is an interface for components that respond to HTTP requests on behalf of the broker
type UpdatingPreviousValues ¶
type UpdatingPreviousValues struct {
PlanID string `json:"plan_id"`
}
UpdatingPreviousValues represents the information about the service instance prior to the update. Our broker doesn't need it. Per spec, it still could be provided.
type UpdatingRequest ¶
type UpdatingRequest struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters service.UpdatingParameters `json:"parameters"` PreviousValues UpdatingPreviousValues `json:"previous_values"` }
UpdatingRequest represents a request to update a service
func (*UpdatingRequest) ToJSON ¶
func (u *UpdatingRequest) ToJSON() ([]byte, error)
ToJSON returns a []byte containing a JSON representation of the updating request