Documentation ¶
Index ¶
- Constants
- Variables
- func Route(container *restful.Container, path string, b Broker)
- func ValidateUUID(path *field.Path, u string) field.ErrorList
- type BindRequest
- type BindResponse
- type Broker
- type CatalogResponse
- type DashboardClient
- type DeprovisionResponse
- type ErrorResponse
- type KubernetesContext
- type LastOperationResponse
- type LastOperationState
- type Operation
- type Plan
- type ProvisionRequest
- type ProvisionResponse
- type Response
- type Service
- type UnbindResponse
- type UpdateRequest
- type UpdateResponse
Constants ¶
const ( // XBrokerAPIVersion is the header for the openservice broker api versoin XBrokerAPIVersion = "X-Broker-Api-Version" // APIVersion is the version of the openservice broker api supported by this broker APIVersion = "2.11" )
const ( ServiceMetadataDisplayName = "displayName" ServiceMetadataImageURL = "imageUrl" ServiceMetadataLongDescription = "longDescription" ServiceMetadataProviderDisplayName = "providerDisplayName" ServiceMetadataDocumentationURL = "documentationUrl" ServiceMetadataSupportURL = "supportUrl" )
Variables ¶
var AsyncRequired = struct { Error string `json:"error,omitempty"` Description string `json:"description"` }{ Error: "AsyncRequired", Description: "This service plan requires client support for asynchronous service operations.", }
Functions ¶
Types ¶
type BindRequest ¶
type BindRequest struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` AppGUID string `json:"app_guid,omitempty"` BindResource struct { AppGUID string `json:"app_guid,omitempty"` Route string `json:"route,omitempty"` } `json:"bind_resource,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` }
BindRequest is sent as part of a bind api call
type BindResponse ¶
type BindResponse struct { Credentials map[string]interface{} `json:"credentials,omitempty"` SyslogDrainURL string `json:"syslog_drain_url,omitempty"` RouteServiceURL string `json:"route_service_url,omitempty"` VolumeMounts []interface{} `json:"volume_mounts,omitempty"` }
BindResponse is sent in response to a bind api call
type Broker ¶
type Broker interface { Catalog() *Response Provision(instance_id string, preq *ProvisionRequest) *Response Deprovision(instance_id string) *Response Bind(instance_id string, binding_id string, breq *BindRequest) *Response Unbind(instance_id string, binding_id string) *Response LastOperation(instance_id string, operation Operation) *Response }
type CatalogResponse ¶
type CatalogResponse struct {
Services []*Service `json:"services"`
}
CatalogResponse is sent as the response to catalog requests
type DashboardClient ¶
type DashboardClient struct { ID string `json:"id"` Secret string `json:"secret"` RedirectURI string `json:"redirect_uri"` }
DashboardClient contains information about the oauth SSO flow for the service dashboard
type DeprovisionResponse ¶
type DeprovisionResponse struct {
Operation Operation `json:"operation,omitempty"`
}
DeprovisionResponse is sent in response to a deprovision call
type ErrorResponse ¶
type ErrorResponse struct {
Description string `json:"description"`
}
type KubernetesContext ¶
type KubernetesContext struct { Platform string `json:"platform"` Namespace string `json:"namespace"` }
KubernetesContext is sent as part of a provision or update call to a service broker running in a kubernetes cluter.
type LastOperationResponse ¶
type LastOperationResponse struct { State LastOperationState `json:"state"` Description string `json:"description,omitempty"` }
LastOperationResponse is sent as a response to last operation requests
type LastOperationState ¶
type LastOperationState string
const ( LastOperationStateInProgress LastOperationState = "in progress" LastOperationStateSucceeded LastOperationState = "succeeded" LastOperationStateFailed LastOperationState = "failed" )
type Plan ¶
type Plan struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Metadata map[string]interface{} `json:"metadata,omitempty"` Free bool `json:"free,omitempty"` Bindable bool `json:"bindable,omitempty"` }
Plan is a plan within a service offering
type ProvisionRequest ¶
type ProvisionRequest struct { Context KubernetesContext `json:"context"` ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters map[string]string `json:"parameters,omitempty"` AcceptsIncomplete bool `json:"accepts_incomplete,omitempty"` OrganizationID string `json:"organization_guid"` SpaceID string `json:"space_guid"` }
ProvisionRequest is sent as part of a provision api call
type ProvisionResponse ¶
type ProvisionResponse struct { DashboardURL string `json:"dashboard_url,omitempty"` Operation Operation `json:"operation,omitempty"` }
ProvisionResponse is sent in response to a provision call
type Service ¶
type Service struct { Name string `json:"name"` ID string `json:"id"` Description string `json:"description"` Tags []string `json:"tags,omitempty"` Requires []string `json:"requires,omitempty"` Bindable bool `json:"bindable"` Metadata map[string]interface{} `json:"metadata,omitempty"` DashboardClient *DashboardClient `json:"dashboard_client,omitempty"` PlanUpdatable bool `json:"plan_updateable,omitempty"` Plans []Plan `json:"plans"` }
Service is an available service listed in the catalog
type UnbindResponse ¶
type UnbindResponse struct { }
UnbindResponse is sent in response to an unbind call
type UpdateRequest ¶
type UpdateRequest struct { Context KubernetesContext `json:"context"` ServiceID string `json:"service_id"` PlanID string `json:"plan_id,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` AcceptsIncomplete bool `json:"accepts_incomplete,omitempty"` PreviousValues struct { ServiceID string `json:"service_id,omitempty"` PlanID string `json:"plan_id,omitempty"` OrganizationID string `json:"organization_id,omitempty"` SpaceID string `json:"space_id,omitempty"` } `json:"previous_values,omitempty"` }
type UpdateResponse ¶
type UpdateResponse struct {
Operation Operation `json:"operation,omitempty"`
}