Documentation ¶
Index ¶
- Constants
- Variables
- func AttachRoutes(router *mux.Router, serviceBroker ServiceBroker, logger lager.Logger)
- func FreeValue(v bool) *bool
- func New(serviceBroker ServiceBroker, logger lager.Logger, ...) http.Handler
- type BindDetails
- type BindResource
- type Binding
- type BrokerCredentials
- type CatalogResponse
- type DeprovisionDetails
- type DeprovisionResponse
- type DeprovisionServiceSpec
- type EmptyResponse
- type ErrorResponse
- type LastOperation
- type LastOperationResponse
- type LastOperationState
- type PreviousValues
- type ProvisionDetails
- type ProvisionedServiceSpec
- type ProvisioningResponse
- type RequiredPermission
- type Service
- type ServiceBroker
- type ServiceDashboardClient
- type ServiceMetadata
- type ServicePlan
- type ServicePlanCost
- type ServicePlanMetadata
- type SharedDevice
- type UnbindDetails
- type UpdateDetails
- type UpdateResponse
- type UpdateServiceSpec
- type VolumeMount
Constants ¶
View Source
const ( PermissionRouteForwarding = RequiredPermission("route_forwarding") PermissionSyslogDrain = RequiredPermission("syslog_drain") PermissionVolumeMount = RequiredPermission("volume_mount") )
Variables ¶
View Source
var ( ErrInstanceAlreadyExists = errors.New("instance already exists") ErrInstanceDoesNotExist = errors.New("instance does not exist") ErrInstanceLimitMet = errors.New("instance limit for this service has been reached") ErrPlanQuotaExceeded = errors.New("The quota for this service plan has been exceeded. Please contact your Operator for help.") ErrBindingAlreadyExists = errors.New("binding already exists") ErrBindingDoesNotExist = errors.New("binding does not exist") ErrAsyncRequired = errors.New("This service plan requires client support for asynchronous service operations.") ErrPlanChangeNotSupported = errors.New("The requested plan migration cannot be performed") ErrRawParamsInvalid = errors.New("The format of the parameters is not valid JSON") ErrAppGuidNotProvided = errors.New("app_guid is a required field but was not provided") )
Functions ¶
func AttachRoutes ¶
func AttachRoutes(router *mux.Router, serviceBroker ServiceBroker, logger lager.Logger)
func New ¶
func New(serviceBroker ServiceBroker, logger lager.Logger, brokerCredentials BrokerCredentials) http.Handler
Types ¶
type BindDetails ¶
type BindDetails struct { AppGUID string `json:"app_guid"` PlanID string `json:"plan_id"` ServiceID string `json:"service_id"` BindResource *BindResource `json:"bind_resource,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty"` }
type BindResource ¶
type Binding ¶
type Binding struct { Credentials interface{} `json:"credentials"` SyslogDrainURL string `json:"syslog_drain_url,omitempty"` RouteServiceURL string `json:"route_service_url,omitempty"` VolumeMounts []VolumeMount `json:"volume_mounts,omitempty"` }
type BrokerCredentials ¶
type CatalogResponse ¶
type CatalogResponse struct {
Services []Service `json:"services"`
}
type DeprovisionDetails ¶
type DeprovisionResponse ¶
type DeprovisionResponse struct {
OperationData string `json:"operation,omitempty"`
}
type DeprovisionServiceSpec ¶
type EmptyResponse ¶
type EmptyResponse struct{}
type ErrorResponse ¶
type LastOperation ¶
type LastOperation struct { State LastOperationState Description string }
type LastOperationResponse ¶
type LastOperationState ¶
type LastOperationState string
const ( InProgress LastOperationState = "in progress" Succeeded LastOperationState = "succeeded" Failed LastOperationState = "failed" )
type PreviousValues ¶
type ProvisionDetails ¶
type ProvisionedServiceSpec ¶
type ProvisioningResponse ¶
type RequiredPermission ¶
type RequiredPermission string
type Service ¶
type Service struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Bindable bool `json:"bindable"` Tags []string `json:"tags,omitempty"` PlanUpdatable bool `json:"plan_updateable"` Plans []ServicePlan `json:"plans"` Requires []RequiredPermission `json:"requires,omitempty"` Metadata *ServiceMetadata `json:"metadata,omitempty"` DashboardClient *ServiceDashboardClient `json:"dashboard_client,omitempty"` }
type ServiceBroker ¶
type ServiceBroker interface { Services() []Service Provision(instanceID string, details ProvisionDetails, asyncAllowed bool) (ProvisionedServiceSpec, error) Deprovision(instanceID string, details DeprovisionDetails, asyncAllowed bool) (DeprovisionServiceSpec, error) Bind(instanceID, bindingID string, details BindDetails) (Binding, error) Unbind(instanceID, bindingID string, details UnbindDetails) error Update(instanceID string, details UpdateDetails, asyncAllowed bool) (UpdateServiceSpec, error) LastOperation(instanceID, operationData string) (LastOperation, error) }
type ServiceDashboardClient ¶
type ServiceMetadata ¶
type ServiceMetadata struct { DisplayName string `json:"displayName,omitempty"` ImageUrl string `json:"imageUrl,omitempty"` LongDescription string `json:"longDescription,omitempty"` ProviderDisplayName string `json:"providerDisplayName,omitempty"` DocumentationUrl string `json:"documentationUrl,omitempty"` SupportUrl string `json:"supportUrl,omitempty"` }
type ServicePlan ¶
type ServicePlan struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Free *bool `json:"free,omitempty"` Metadata *ServicePlanMetadata `json:"metadata,omitempty"` }
type ServicePlanCost ¶
type ServicePlanMetadata ¶
type ServicePlanMetadata struct { DisplayName string `json:"displayName,omitempty"` Bullets []string `json:"bullets,omitempty"` Costs []ServicePlanCost `json:"costs,omitempty"` }
type SharedDevice ¶
type SharedDevice struct {}
type UnbindDetails ¶
type UpdateDetails ¶
type UpdateDetails struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters map[string]interface{} `json:"parameters"` PreviousValues PreviousValues `json:"previous_values"` }
type UpdateResponse ¶
type UpdateResponse struct {
OperationData string `json:"operation,omitempty"`
}
type UpdateServiceSpec ¶
type VolumeMount ¶
type VolumeMount struct { Driver string `json:"driver"` ContainerDir string `json:"container_dir"` Mode string `json:"mode"` DeviceType string `json:"device_type"` Device SharedDevice `json:"device"` }
Click to show internal directories.
Click to hide internal directories.