broker

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPort     = "3000"
	DefaultLogLevel = "debug"
)

Variables

This section is empty.

Functions

func NewAPI

func NewAPI(broker domain.ServiceBroker, logger lager.Logger, config Config) http.Handler

Types

type API

type API struct {
	BasicAuthUsername string `json:"basic_auth_username"`
	BasicAuthPassword string `json:"basic_auth_password"`
	Port              string `json:"port"`
	LogLevel          string `json:"log_level"`
	LagerLogLevel     lager.LogLevel
}

func (API) ConvertLogLevel

func (api API) ConvertLogLevel() (lager.LogLevel, error)

type Broker

type Broker struct {
	Provider provider.ServiceProvider
	// contains filtered or unexported fields
}

func New

func New(config Config, serviceProvider provider.ServiceProvider, logger lager.Logger) *Broker

func (*Broker) Bind

func (b *Broker) Bind(
	ctx context.Context,
	instanceID, bindingID string,
	details domain.BindDetails,
	asyncAllowed bool,
) (domain.Binding, error)

func (*Broker) Deprovision

func (b *Broker) Deprovision(
	ctx context.Context,
	instanceID string,
	details domain.DeprovisionDetails,
	asyncAllowed bool,
) (domain.DeprovisionServiceSpec, error)

func (*Broker) GetBinding added in v0.24.0

func (b *Broker) GetBinding(ctx context.Context, first, second string) (domain.GetBindingSpec, error)

func (*Broker) GetInstance added in v0.24.0

func (b *Broker) GetInstance(ctx context.Context, first string) (domain.GetInstanceDetailsSpec, error)

func (*Broker) LastBindingOperation added in v0.24.0

func (b *Broker) LastBindingOperation(ctx context.Context, first, second string, pollDetails domain.PollDetails) (domain.LastOperation, error)

func (*Broker) LastOperation

func (b *Broker) LastOperation(
	ctx context.Context,
	instanceID string,
	pollDetails domain.PollDetails,
) (domain.LastOperation, error)

func (*Broker) Provision

func (b *Broker) Provision(
	ctx context.Context,
	instanceID string,
	details domain.ProvisionDetails,
	asyncAllowed bool,
) (domain.ProvisionedServiceSpec, error)

func (*Broker) Services

func (b *Broker) Services(ctx context.Context) ([]domain.Service, error)

func (*Broker) Unbind

func (b *Broker) Unbind(
	ctx context.Context,
	instanceID, bindingID string,
	details domain.UnbindDetails,
	asyncAllowed bool,
) (domain.UnbindSpec, error)

func (*Broker) Update

func (b *Broker) Update(
	ctx context.Context,
	instanceID string,
	details domain.UpdateDetails,
	asyncAllowed bool,
) (domain.UpdateServiceSpec, error)

type Catalog

type Catalog struct {
	Catalog apiresponses.CatalogResponse `json:"catalog"`
}

type Config

type Config struct {
	API      API
	Catalog  Catalog
	Provider []byte
}

func NewConfig

func NewConfig(source io.Reader) (Config, error)

func (Config) Validate

func (c Config) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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