apiclient

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2018 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	Catalog()
	ProvisionAndBind(serviceID, planID string)
	Bind(serviceID, planID, instanceID, bindingID string)
	Unbind(serviceID, planID, instanceID, bindingID string)
	Deprovision(serviceID, planID, instanceID string)
	LastOperation(serviceID, planID, instanceID string)
}

Broker describes the interactions with remote service brokers or similar

type OpenServiceBroker

type OpenServiceBroker struct {
	// contains filtered or unexported fields
}

OpenServiceBroker is the client struct for connecting to remote Open Service Broker API

func NewOpenServiceBroker

func NewOpenServiceBroker(url, client, clientSecret, apiVersion string) *OpenServiceBroker

NewOpenServiceBroker constructs OpenServiceBroker

func (*OpenServiceBroker) Bind

func (broker *OpenServiceBroker) Bind(serviceID, planID, instanceID, bindingID string) (binding *brokerapi.Binding, err error)

Bind requests new set of credentials to access service instance

func (*OpenServiceBroker) Catalog

func (broker *OpenServiceBroker) Catalog() (catalogResp *brokerapi.CatalogResponse, err error)

Catalog fetches the available service catalog from remote broker

func (*OpenServiceBroker) Deprovision

func (broker *OpenServiceBroker) Deprovision(serviceID, planID, instanceID string) (deprovisioningResp *brokerapi.DeprovisionResponse, isAsync bool, err error)

Deprovision destroys the service instance

func (*OpenServiceBroker) FindPlanByNameOrID

func (broker *OpenServiceBroker) FindPlanByNameOrID(service *brokerapi.Service, nameOrID string) (*brokerapi.ServicePlan, error)

FindPlanByNameOrID looks thru all plans for a service for one that has a name or ID matching 'nameOrID'. Defaults to first plan if 'nameOrID' is empty.

func (*OpenServiceBroker) FindServiceByNameOrID

func (broker *OpenServiceBroker) FindServiceByNameOrID(nameOrID string) (*brokerapi.Service, error)

FindServiceByNameOrID looks thru all services in catalog for one that has a name or ID matching 'nameOrID'

func (*OpenServiceBroker) LastOperation

func (broker *OpenServiceBroker) LastOperation(serviceID, planID, instanceID, operation string) (lastOpResp *brokerapi.LastOperationResponse, err error)

LastOperation fetches the status of the last operation perform upon a service instance

func (*OpenServiceBroker) Provision

func (broker *OpenServiceBroker) Provision(serviceID, planID, instanceID string) (provisioningResp *brokerapi.ProvisioningResponse, isAsync bool, err error)

Provision attempts to provision a new service instance

func (*OpenServiceBroker) Unbind

func (broker *OpenServiceBroker) Unbind(serviceID, planID, instanceID, bindingID string) (err error)

Unbind destroys a set of credentials to access the service instance

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL