Documentation ¶
Index ¶
- Constants
- Variables
- func New(serviceBroker ServiceBroker, logger lager.Logger, ...) http.Handler
- type BindDetails
- type BindingResponse
- type BrokerCredentials
- type Catalog
- type CatalogResponse
- type Cost
- type CredentialsHash
- type DashboardClient
- type DeprovisionDetails
- type EmptyResponse
- type ErrorResponse
- type LastOperationResponse
- type PreviousValues
- type ProvisionDetails
- type ProvisioningResponse
- type Service
- type ServiceBroker
- type ServiceMetadata
- type ServicePlan
- type ServicePlanMetadata
- type UnbindDetails
- type UpdateDetails
Constants ¶
View Source
const LastOperationFailed = "failed"
View Source
const LastOperationInProgress = "in progress"
View Source
const LastOperationSucceeded = "succeeded"
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") ErrInstanceNotUpdateable = errors.New("instance is not updateable") ErrInstanceNotBindable = errors.New("instance is not bindable") 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.") ErrAppGUIDRequired = errors.New("This service supports generation of credentials through binding an application only.") )
Functions ¶
func New ¶
func New(serviceBroker ServiceBroker, logger lager.Logger, brokerCredentials BrokerCredentials) http.Handler
Types ¶
type BindDetails ¶
type BindingResponse ¶
type BindingResponse struct { Credentials interface{} `json:"credentials"` SyslogDrainURL string `json:"syslog_drain_url,omitempty"` }
type BrokerCredentials ¶
type Catalog ¶
type Catalog struct {
Services []Service `json:"services"`
}
func (Catalog) FindService ¶
func (Catalog) FindServicePlan ¶
func (c Catalog) FindServicePlan(planID string) (plan ServicePlan, found bool)
type CatalogResponse ¶
type CatalogResponse struct {
Services []Service `json:"services"`
}
type CredentialsHash ¶
type CredentialsHash struct { Host string `json:"host,omitempty"` Port int64 `json:"port,omitempty"` Name string `json:"name,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` URI string `json:"uri,omitempty"` JDBCURI string `json:"jdbcUrl,omitempty"` }
type DashboardClient ¶
type DeprovisionDetails ¶
type EmptyResponse ¶
type EmptyResponse struct{}
type ErrorResponse ¶
type LastOperationResponse ¶
type PreviousValues ¶
type ProvisionDetails ¶
type ProvisioningResponse ¶
type ProvisioningResponse struct {
DashboardURL string `json:"dashboard_url,omitempty"`
}
type Service ¶
type Service struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Bindable bool `json:"bindable,omitempty"` Tags []string `json:"tags,omitempty"` Metadata *ServiceMetadata `json:"metadata,omitempty"` Requires []string `json:"requires,omitempty"` PlanUpdateable bool `json:"plan_updateable"` Plans []ServicePlan `json:"plans"` DashboardClient *DashboardClient `json:"dashboard_client,omitempty"` }
type ServiceBroker ¶
type ServiceBroker interface { Services() CatalogResponse Provision(instanceID string, details ProvisionDetails, acceptsIncomplete bool) (ProvisioningResponse, bool, error) Update(instanceID string, details UpdateDetails, acceptsIncomplete bool) (bool, error) Deprovision(instanceID string, details DeprovisionDetails, acceptsIncomplete bool) (bool, error) Bind(instanceID string, bindingID string, details BindDetails) (BindingResponse, error) Unbind(instanceID string, bindingID string, details UnbindDetails) error LastOperation(instanceID string) (LastOperationResponse, error) }
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"` Metadata *ServicePlanMetadata `json:"metadata,omitempty"` Free bool `json:"free"` }
func (ServicePlan) Validate ¶
func (sp ServicePlan) Validate() error
type ServicePlanMetadata ¶
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"` }
Click to show internal directories.
Click to hide internal directories.