Documentation ¶
Index ¶
- Constants
- func Bind(host string, port int, username string, password string, instanceID string, ...) (string, map[string]interface{}, error)
- func Deprovision(host string, port int, username string, password string, instanceID string) error
- func Poll(host string, port int, username string, password string, instanceID string, ...) (string, error)
- func Provision(host string, port int, username string, password string, serviceID string, ...) (string, error)
- func Unbind(host string, port int, username string, password string, instanceID string, ...) error
- func Update(host string, port int, username string, password string, instanceID string, ...) error
- type BindingRequest
- type BindingResponse
- type Catalog
- type Plan
- type ProvisioningRequest
- type Service
- type ServiceMetadata
- type ServicePlanMetadata
- type UpdatingPreviousValues
- type UpdatingRequest
Constants ¶
const ( // OperationProvisioning represents the "provisioning" operation OperationProvisioning = "provisioning" // OperationUpdating represents the "updating" operation OperationUpdating = "updating" // OperationDeprovisioning represents the "deprovisioning" operation OperationDeprovisioning = "deprovisioning" // OperationStateInProgress represents the state of an operation that is still // pending completion OperationStateInProgress = "in progress" // OperationStateSucceeded represents the state of an operation that has // completed successfully OperationStateSucceeded = "succeeded" // OperationStateFailed represents the state of an operation that has // failed OperationStateFailed = "failed" // OperationStateGone is a pseudo oepration state represting the "state" // of an operation against an entity that no longer exists OperationStateGone = "gone" )
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
func Bind( host string, port int, username string, password string, instanceID string, params map[string]interface{}, ) (string, map[string]interface{}, error)
Bind carries out binding to an existing service
func Deprovision ¶
func Deprovision( host string, port int, username string, password string, instanceID string, ) error
Deprovision initiates deprovisioning of a service instance
func Poll ¶
func Poll( host string, port int, username string, password string, instanceID string, operation string, ) (string, error)
Poll polls the status of an instance
func Provision ¶
func Provision( host string, port int, username string, password string, serviceID string, planID string, params map[string]interface{}, tags map[string]string, ) (string, error)
Provision initiates provisioning of a new service instance
Types ¶
type BindingRequest ¶ added in v0.10.0
type BindingRequest struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters map[string]interface{} `json:"parameters"` }
BindingRequest represents a request to bind to a service
type BindingResponse ¶ added in v0.10.0
type BindingResponse struct {
Credentials map[string]interface{} `json:"credentials"`
}
BindingResponse represents the response to a binding request
type Catalog ¶ added in v0.10.0
type Catalog struct {
Services []Service `json:"services"`
}
Catalog represents the full set of service/plan offerings provided by a broker
type Plan ¶ added in v0.10.0
type Plan struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Free bool `json:"free"` Metadata *ServicePlanMetadata `json:"metadata,omitempty"` }
Plan represents a concrete variation of a Service; typically these are different SKUs for the same KIND of service
type ProvisioningRequest ¶ added in v0.10.0
type ProvisioningRequest struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters map[string]interface{} `json:"parameters"` }
ProvisioningRequest represents a request to provision a service instance
type Service ¶ added in v0.10.0
type Service struct { Name string `json:"name"` ID string `json:"id"` Description string `json:"description"` Metadata *ServiceMetadata `json:"metadata,omitempty"` Plans []Plan `json:"plans"` Tags []string `json:"tags"` Bindable bool `json:"bindable"` PlanUpdatable bool `json:"plan_updateable"` // Misspelling is }
Service represents a KIND of service
type ServiceMetadata ¶ added in v0.10.0
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"` }
ServiceMetadata represents optional, extended metadata for a service
type ServicePlanMetadata ¶ added in v0.10.0
type ServicePlanMetadata struct { DisplayName string `json:"displayName,omitempty"` Bullets []string `json:"bullets,omitempty"` }
ServicePlanMetadata represents optional, extended metadata for a plan
type UpdatingPreviousValues ¶ added in v0.10.0
type UpdatingPreviousValues struct {
PlanID string `json:"plan_id"`
}
UpdatingPreviousValues represents the information about the service instance prior to the update
type UpdatingRequest ¶ added in v0.10.0
type UpdatingRequest struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters map[string]interface{} `json:"parameters"` PreviousValues UpdatingPreviousValues `json:"previous_values"` }
UpdatingRequest represents a request to update a service