Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindResponse ¶
type BindResponse struct { osb.BindResponse // Exists - is set if the request was already completed // and the requested parameters are identical to the existing // Service Binding. Exists bool `json:"-"` }
BindResponse is sent as the response to a bind call.
type CatalogResponse ¶
type CatalogResponse struct {
osb.CatalogResponse
}
CatalogResponse is sent as the response to a catalog requests.
type CloudFoundryUserInfo ¶
CloudFoundryUserInfo - cloud foundry user info object
type DeprovisionResponse ¶
type DeprovisionResponse struct {
osb.DeprovisionResponse
}
DeprovisionResponse is sent as the response to a deprovision call.
type GetBindingResponse ¶
type GetBindingResponse struct {
osb.GetBindingResponse
}
GetBinding is sent as the response to a get binding call.
type Identity ¶
type Identity struct { Platform string Kubernetes *KubernetesUserInfo CloudFoundry *CloudFoundryUserInfo Unknown map[string]interface{} }
Identity - union type, used to access the correct originating identity implementation type
func ParseIdentity ¶
func ParseIdentity(o osb.OriginatingIdentity) (Identity, error)
ParseIdentity - retrieve the identity union type
type Interface ¶
type Interface interface { // ValidateBrokerAPIVersion encapsulates the business logic of validating // the OSB API version sent to the broker with every request and returns // an error. // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#api-version-header ValidateBrokerAPIVersion(version string) error // GetCatalog encapsulates the business logic for returning the broker's // catalog of services. Brokers must tell platforms they're integrating with // which services they provide. GetCatalog is called when a platform makes // initial contact with the broker to find out about that broker's services. // // The parameters are: // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#catalog-management GetCatalog(c *RequestContext) (*CatalogResponse, error) // Provision encapsulates the business logic for a provision operation and // returns a osb.ProvisionResponse or an error. Provisioning creates a new // instance of a particular service. // // The parameters are: // - a osb.ProvisionRequest created from the original http request // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // Implementers should return a ProvisionResponse for a successful operation // or an error. The APISurface handles translating ProvisionResponses or // errors into the correct form in the http response. // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#provisioning Provision(request *osb.ProvisionRequest, c *RequestContext) (*ProvisionResponse, error) // Deprovision encapsulates the business logic for a deprovision operation // and returns a osb.DeprovisionResponse or an error. Deprovisioning deletes // an instance of a service and releases the resources associated with it. // // The parameters are: // - a osb.DeprovisionRequest created from the original http request // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // Implementers should return a DeprovisionResponse for a successful // operation or an error. The APISurface handles translating // DeprovisionResponses or errors into the correct form in the http // response. // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#deprovisioning Deprovision(request *osb.DeprovisionRequest, c *RequestContext) (*DeprovisionResponse, error) // LastOperation encapsulates the business logic for a last operation // request and returns a osb.LastOperationResponse or an error. // LastOperation is called when a platform checks the status of an ongoing // asynchronous operation on an instance of a service. // // The parameters are: // - a osb.LastOperationRequest created from the original http request // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // Implementers should return a LastOperationResponse for a successful // operation or an error. The APISurface handles translating // LastOperationResponses or errors into the correct form in the http // response. // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#polling-last-operation LastOperation(request *osb.LastOperationRequest, c *RequestContext) (*LastOperationResponse, error) // Bind encapsulates the business logic for a bind operation and returns a // osb.BindResponse or an error. Binding creates a new set of credentials for // a consumer to use an instance of a service. Not all services are // bindable; in order for a service to be bindable, either the service or // the current plan associated with the instance must declare itself to be // bindable. // // The parameters are: // - a osb.BindRequest created from the original http request // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // Implementers should return a BindResponse for a successful operation or // an error. The APISurface handles translating BindResponses or errors into // the correct form in the http response. // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#binding Bind(request *osb.BindRequest, c *RequestContext) (*BindResponse, error) // GetBinding encapsulates the business logic that returns a binding in // the form of a BindingResponse. The platform will only request a Binding // if the broker's catalog has declared `"bindings_retrievable": true` for // a particular service. // // The parameters are: // - a osb.GetBindingRequest created from the original http request // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // Implementers should return a GetBindingResponse for a successful operation // or an error. The APISurface handles translating GetBindingResponses or // errors into the correct form in the http response. // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#fetching-a-service-binding GetBinding(request *osb.GetBindingRequest, c *RequestContext) (*GetBindingResponse, error) // BindingLastOperation encapsulates the business logic for a last operation // request and returns a osb.BindingLastOperationResponse or an error. // BindingLastOperation is called when a platform checks the status of an ongoing // asynchronous binding operation on an instance of a binding. // // NOTE: Asynchronous bindings are currently a proposal against the OSB spec // that is in the "validating through implementation phase". For more information, // see the PR: https://github.com/openservicebrokerapi/servicebroker/pull/334 // // The parameters are: // - a osb.BindingLastOperationRequest created from the original http request // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // Implementers should return a BindingLastOperationResponse for a successful // operation or an error. The APISurface handles translating // BindingLastOperationResponses or errors into the correct form in the http // response. // // For more information, see: // // https://github.com/mattmcneeney/servicebroker/blob/219bf56c58a2f37d4a1a1b1b49b6e0dcc9683167/spec.md#polling-last-operation-for-service-bindings BindingLastOperation(request *osb.BindingLastOperationRequest, c *RequestContext) (*LastOperationResponse, error) // Unbind encapsulates the business logic for an unbind operation and // returns a osb.UnbindResponse or an error. Unbind deletes a binding and the // resources associated with it. // // The parameters are: // - a osb.UnbindRequest created from the original http request // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // Implementers should return a UnbindResponse for a successful operation or // an error. The APISurface handles translating UnbindResponses or errors // into the correct form in the http response. // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#unbinding Unbind(request *osb.UnbindRequest, c *RequestContext) (*UnbindResponse, error) // Update encapsulates the business logic for an update operation and // returns a osb.UpdateInstanceResponse or an error. Update updates the // instance. // // The parameters are: // - a osb.UpdateInstanceRequest created from the original http request // - a RequestContext object which encapsulates: // - a response writer, in case fine-grained control over the response is // required // - the original http request, in case access is required (to get special // request headers, for example) // // Implementers should return a UpdateInstanceResponse for a successful operation or // an error. The APISurface handles translating UpdateInstanceResponses or errors // into the correct form in the http response. // // For more information, see: // // https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#updating-a-service-instance Update(request *osb.UpdateInstanceRequest, c *RequestContext) (*UpdateInstanceResponse, error) }
Interface contains the business logic for the broker's operations. Interface is the interface broker authors should implement and is embedded in an APISurface.
type KubernetesUserInfo ¶
type KubernetesUserInfo struct { Username string `json:"username"` UID string `json:"uid"` Groups []string `json:"groups"` Extra map[string][]string `json:"extra"` }
KubernetesUserInfo - kubernetes user info object
type LastOperationResponse ¶
type LastOperationResponse struct {
osb.LastOperationResponse
}
LastOperationResponse is sent as the response to a last operation call.
type ProvisionResponse ¶
type ProvisionResponse struct { osb.ProvisionResponse // Exists - is set if the request was already completed // and the requested parameters are identical to the existing // Service Instance. Exists bool `json:"-"` }
ProvisionResponse is sent as the response to a provision call.
type RequestContext ¶
type RequestContext struct { Writer http.ResponseWriter Request *http.Request }
RequestContext encapsulates the following parameters:
- a response writer, in case fine-grained control over the response is required
- the original http request, in case access is required (to get special request headers, for example)
type UnbindResponse ¶
type UnbindResponse struct {
osb.UnbindResponse
}
UnbindResponse is sent as the response to a bind call.
type UpdateInstanceResponse ¶
type UpdateInstanceResponse struct {
osb.UpdateInstanceResponse
}
UpdateInstanceResponse is sent as the response to a update call.