client

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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

func Unbind

func Unbind(
	host string,
	port int,
	username string,
	password string,
	instanceID string,
	bindingID string,
) error

Unbind carries out unbinding

func Update

func Update(
	host string,
	port int,
	username string,
	password string,
	instanceID string,
	serviceID string,
	planID string,
	params map[string]interface{},
) error

Update initiates updating of an existing 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

func GetCatalog

func GetCatalog(
	host string,
	port int,
	username string,
	password string,
) (Catalog, error)

GetCatalog retrieves the catalog from the broker specoified by host name and port number

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

Jump to

Keyboard shortcuts

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