client

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: MIT Imports: 8 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(
	useSSL bool,
	skipCertValidation bool,
	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(
	useSSL bool,
	skipCertValidation bool,
	host string,
	port int,
	username string,
	password string,
	instanceID string,
) error

Deprovision initiates deprovisioning of a service instance

func Poll

func Poll(
	useSSL bool,
	skipCertValidation bool,
	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(
	useSSL bool,
	skipCertValidation bool,
	host string,
	port int,
	username string,
	password string,
	serviceID string,
	planID string,
	params map[string]interface{},
) (string, error)

Provision initiates provisioning of a new service instance

func Unbind

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

Unbind carries out unbinding

func Update

func Update(
	useSSL bool,
	skipCertValidation bool,
	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

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

type BindingResponse struct {
	Credentials map[string]interface{} `json:"credentials"`
}

BindingResponse represents the response to a binding request

type Catalog

type Catalog struct {
	Services []Service `json:"services"`
}

Catalog represents the full set of service/plan offerings provided by a broker

func GetCatalog

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

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

type Plan

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

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

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

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

type ServicePlanMetadata struct {
	DisplayName string   `json:"displayName,omitempty"`
	Bullets     []string `json:"bullets,omitempty"`
}

ServicePlanMetadata represents optional, extended metadata for a plan

type UpdatingPreviousValues

type UpdatingPreviousValues struct {
	PlanID string `json:"plan_id"`
}

UpdatingPreviousValues represents the information about the service instance prior to the update

type UpdatingRequest

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