broker

package
v0.0.0-...-9afd29f Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2014 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindCredentials

type BindCredentials struct {
	Uri      string `json:"uri"`
	Username string `json:"username"`
	Password string `json:"password"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Database string `json:"database"`
}

type BindRequest

type BindRequest struct {
	ServiceID string `json:"service_id"`
	PlanID    string `json:"plan_id"`
	AppID     string `json:"app_guid"`
}

type BindResponse

type BindResponse struct {
	Credentials BindCredentials `json:"credentials"`
}

type Broker

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

func New

func New(user, pass string, plans map[string]config.PlanConfig) Broker

func (*Broker) Listen

func (b *Broker) Listen(addr string)

func (*Broker) RegisterService

func (b *Broker) RegisterService(id string, service ServiceBroker)

type ServiceBroker

type ServiceBroker interface {
	Create(string, ServiceRequest, config.PlanConfig) error
	Destroy(string) error

	Bind(string, string, BindRequest, config.PlanConfig) (BindResponse, error)
	Unbind(string, string) error
}

type ServiceRequest

type ServiceRequest struct {
	ServiceID      string `json:"service_id"`
	PlanID         string `json:"plan_id"`
	OrganizationID string `json:"organization_guid"`
	SpaceID        string `json:"space_guid"`
}

Jump to

Keyboard shortcuts

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