Documentation ¶
Index ¶
- Constants
- func RunExample(client *Client, example broker.ServiceExample, ...) error
- func RunExamplesForService(registry broker.BrokerRegistry, client *Client, serviceName string) error
- type BrokerResponse
- type Client
- func (client *Client) Bind(instanceId, bindingId, serviceId, planId string, parameters json.RawMessage) *BrokerResponse
- func (client *Client) Catalog() *BrokerResponse
- func (client *Client) Deprovision(instanceId, serviceId, planId string) *BrokerResponse
- func (client *Client) LastOperation(instanceId string) *BrokerResponse
- func (client *Client) Provision(instanceId, serviceId, planId string, provisioningDetails json.RawMessage) *BrokerResponse
- func (client *Client) Unbind(instanceId, bindingId, serviceId, planId string) *BrokerResponse
- func (client *Client) Update(instanceId, serviceId, planId string, parameters json.RawMessage) *BrokerResponse
Constants ¶
const ( // ClientsBrokerApiVersion is the minimum supported version of the client. // Note: This may need to be changed in the future as we use newer versions // of the OSB API, but should be kept near the lower end of the systems we // expect to be compatible with to ensure any reverse-compatibility measures // put in place work. ClientsBrokerApiVersion = "2.13" )
Variables ¶
This section is empty.
Functions ¶
func RunExample ¶
func RunExample(client *Client, example broker.ServiceExample, service *broker.ServiceDefinition) error
RunExample runs a single example against the given service on the broker pointed to by client.
func RunExamplesForService ¶
func RunExamplesForService(registry broker.BrokerRegistry, client *Client, serviceName string) error
RunExamplesForService runs all the exmaples for a given service name against the service broker pointed to by client. All examples in the registry get run if serviceName is blank.
Types ¶
type BrokerResponse ¶
type BrokerResponse struct { // WARNING: BrokerResponse is exposed to users and automated tooling // so DO NOT remove or rename fields unless strictly necessary. // You MAY add new fields. Error error `json:"error,omitempty"` Url string `json:"url,omitempty"` Method string `json:"http_method,omitempty"` StatusCode int `json:"status_code,omitempty"` ResponseBody json.RawMessage `json:"response,omitempty"` }
BrokerResponse encodes an OSB HTTP response in a (technical) human and machine readable way.
func (*BrokerResponse) InError ¶
func (br *BrokerResponse) InError() bool
func (*BrokerResponse) String ¶
func (br *BrokerResponse) String() string
func (*BrokerResponse) UpdateError ¶
func (br *BrokerResponse) UpdateError(err error)
func (*BrokerResponse) UpdateRequest ¶
func (br *BrokerResponse) UpdateRequest(req *http.Request)
func (*BrokerResponse) UpdateResponse ¶
func (br *BrokerResponse) UpdateResponse(res *http.Response)
type Client ¶
func NewClientFromEnv ¶
NewClientFromEnv creates a new client from the client configuration properties.
func (*Client) Bind ¶
func (client *Client) Bind(instanceId, bindingId, serviceId, planId string, parameters json.RawMessage) *BrokerResponse
Bind creates an account identified by bindingId and gives it access to instanceId
func (*Client) Catalog ¶
func (client *Client) Catalog() *BrokerResponse
Catalog fetches the service catalog
func (*Client) Deprovision ¶
func (client *Client) Deprovision(instanceId, serviceId, planId string) *BrokerResponse
Deprovision destroys a service instance of type instanceId
func (*Client) LastOperation ¶
func (client *Client) LastOperation(instanceId string) *BrokerResponse
LastOperation queries the status of a long-running job on the server
func (*Client) Provision ¶
func (client *Client) Provision(instanceId, serviceId, planId string, provisioningDetails json.RawMessage) *BrokerResponse
Provision creates a new service with the given instanceId, of type serviceId, from the plan planId, with additional details provisioningDetails
func (*Client) Unbind ¶
func (client *Client) Unbind(instanceId, bindingId, serviceId, planId string) *BrokerResponse
Unbind destroys an account identified by bindingId
func (*Client) Update ¶
func (client *Client) Update(instanceId, serviceId, planId string, parameters json.RawMessage) *BrokerResponse
Update sends a patch request to change the plan