Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Raised by Broker Service if service instance or service instance binding already exists ErrCodeConflict = 10 // Raised by Broker Service if service instance or service instance binding cannot be found ErrCodeGone = 20 // Raised by Broker Service for any other issues ErrCodeOther = 99 )
Variables ¶
View Source
var RandomPasswordGenerator = &randomGenerator{16, base64.URLEncoding}
View Source
var UsageStr = `` /* 634-byte string literal not displayed */
Functions ¶
func New ¶
func New(o Options, bs BrokerService) *broker
Types ¶
type BindingRequest ¶
type BindingRequest struct { InstanceId string `json:"-"` BindingId string `json:"-"` ServiceId string `json:"service_id"` PlanId string `json:"plan_id"` AppId string `json:"app_guid"` }
See http://docs.cloudfoundry.com/docs/running/architecture/services/api.html#binding
type BrokerService ¶
type BrokerService interface { // Exposes the catalog of services managed by this broker. // Returns the exposed catalog. Catalog() (Catalog, error) // Creates a service instance of a specified service and plan. // Returns the optional management URL. Provision(ProvisioningRequest) (string, error) // Removes created service instance. Deprovision(ProvisioningRequest) error // Binds to specified service instance. // Returns credentials necessary to establish connection to this // service instance as well as optional syslog drain URL. Bind(BindingRequest) (Credentials, string, error) // Removes created binding. Unbind(BindingRequest) error }
The BrokerService defines the internal API used by the broker's HTTP endpoints.
type BrokerServiceError ¶
type Catalog ¶
type Catalog struct {
Services []Service `json:"services"`
}
See http://docs.cloudfoundry.com/docs/running/architecture/services/api.html#catalog-mgmt
type Credentials ¶
type Credentials map[string]interface{}
type Options ¶
type PasswordGenerator ¶
type Plan ¶
type Plan struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
See http://docs.cloudfoundry.com/docs/running/architecture/services/api.html#catalog-mgmt
type ProvisioningRequest ¶
type ProvisioningRequest struct { InstanceId string `json:"-"` ServiceId string `json:"service_id"` PlanId string `json:"plan_id"` OrgId string `json:"organization_guid"` SpaceId string `json:"space_guid"` }
See http://docs.cloudfoundry.com/docs/running/architecture/services/api.html#provisioning
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"` Requires []string `json:"requires,omitempty"` Plans []Plan `json:"plans"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
See http://docs.cloudfoundry.com/docs/running/architecture/services/api.html#catalog-mgmt
Click to show internal directories.
Click to hide internal directories.