api

package
v0.5.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: MIT Imports: 18 Imported by: 12

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 GetBindingResponseFromJSON

func GetBindingResponseFromJSON(
	jsonBytes []byte,
	bindingResponse *BindingResponse,
) error

GetBindingResponseFromJSON returns a new BindingResponse unmarshalled from the provided JSON []byte

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

func NewBindingRequestFromJSON added in v0.10.0

func NewBindingRequestFromJSON(
	jsonBytes []byte,
) (*BindingRequest, error)

NewBindingRequestFromJSON returns a new BindingRequest unmarshaled from the provided JSON []byte

func (*BindingRequest) ToJSON

func (b *BindingRequest) ToJSON() ([]byte, error)

ToJSON returns a []byte containing a JSON representation of the binding request

type BindingResponse

type BindingResponse struct {
	Credentials service.Credentials `json:"credentials"`
}

BindingResponse represents the response to a binding request

func (*BindingResponse) ToJSON

func (b *BindingResponse) ToJSON() ([]byte, error)

ToJSON returns a []byte containing a JSON representation of the binding response

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

func NewProvisioningRequestFromJSON added in v0.10.0

func NewProvisioningRequestFromJSON(
	jsonBytes []byte,
) (*ProvisioningRequest, error)

NewProvisioningRequestFromJSON returns a new ProvisioningRequest unmarshaled from the provided JSON []byte

func (*ProvisioningRequest) ToJSON

func (p *ProvisioningRequest) ToJSON() ([]byte, error)

ToJSON returns a []byte containing a JSON representation of the provisioning request

type Server

type Server interface {
	// Start causes the api server to start serving HTTP requests. It will block
	// until an error occurs and will return that error.
	Start(context.Context) error
}

Server is an interface for components that respond to HTTP requests on behalf of the broker

func NewServer

func NewServer(
	port int,
	store storage.Store,
	asyncEngine async.Engine,
	authenticator authenticator.Authenticator,
	catalog service.Catalog,
	defaultAzureLocation string,
	defaultAzureResourceGroup string,
) (Server, error)

NewServer returns an HTTP router

type UpdatingPreviousValues

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

UpdatingPreviousValues represents the information about the service instance prior to the update. Our broker doesn't need it. Per spec, it still could be provided.

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

func NewUpdatingRequestFromJSON added in v0.10.0

func NewUpdatingRequestFromJSON(
	jsonBytes []byte,
) (*UpdatingRequest, error)

NewUpdatingRequestFromJSON returns a new UpdatingRequest unmarshaled from the provided JSON []byte

func (*UpdatingRequest) ToJSON

func (u *UpdatingRequest) ToJSON() ([]byte, error)

ToJSON returns a []byte containing a JSON representation of the updating request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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