rest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APISurface

type APISurface struct {
	// Broker contains the business logic that provides the
	// implementation for the different OSB API operations.
	Broker     broker.Interface
	Metrics    *metrics.OSBMetricsCollector
	EnableCORS bool
}

APISurface is a type that describes a OSB REST API surface. APISurface is responsible for decoding HTTP requests and transforming them into the request object for each operation and transforming responses and errors returned from the broker's internal business logic into the correct places in the HTTP response.

func NewAPISurface

func NewAPISurface(brokerInterface broker.Interface, m *metrics.OSBMetricsCollector) (*APISurface, error)

NewAPISurface returns a new, ready-to-go APISurface.

func (*APISurface) BindHandler

func (s *APISurface) BindHandler(w http.ResponseWriter, r *http.Request)

BindHandler is the mux handler that dispatches bind requests to the broker's Interface.

func (*APISurface) BindingLastOperationHandler

func (s *APISurface) BindingLastOperationHandler(w http.ResponseWriter, r *http.Request)

GetBindingLastOperation is the mux handler that dispatches binding last operation requests to the broker's Interface.

func (*APISurface) DeprovisionHandler

func (s *APISurface) DeprovisionHandler(w http.ResponseWriter, r *http.Request)

DeprovisionHandler is the mux handler that dispatches deprovision requests to the broker's Interface.

func (*APISurface) GetBindingHandler

func (s *APISurface) GetBindingHandler(w http.ResponseWriter, r *http.Request)

GetBindingHandler is the mux handler that dispatches get binding requests to the broker's Interface.

func (*APISurface) GetCatalogHandler

func (s *APISurface) GetCatalogHandler(w http.ResponseWriter, r *http.Request)

GetCatalogHandler is the mux handler that dispatches requests to get the broker's catalog to the broker's Interface.

func (*APISurface) GetInstanceHandler

func (s *APISurface) GetInstanceHandler(w http.ResponseWriter, r *http.Request)

GetInstanceHandler is the mux handler that dispatches GetInstanceRequests to the broker's Interface.

func (*APISurface) LastOperationHandler

func (s *APISurface) LastOperationHandler(w http.ResponseWriter, r *http.Request)

LastOperationHandler is the mux handler that dispatches last-operation requests to the broker's Interface.

func (*APISurface) OptionsHandler

func (s *APISurface) OptionsHandler(w http.ResponseWriter, r *http.Request)

OptionsHandler deals with the OPTIONS type request allowing the client to gather the headers.

func (*APISurface) ProvisionHandler

func (s *APISurface) ProvisionHandler(w http.ResponseWriter, r *http.Request)

ProvisionHandler is the mux handler that dispatches ProvisionRequests to the broker's Interface.

func (*APISurface) UnbindHandler

func (s *APISurface) UnbindHandler(w http.ResponseWriter, r *http.Request)

UnbindHandler is the mux handler that dispatches unbind requests to the broker's Interface.

func (*APISurface) UpdateHandler

func (s *APISurface) UpdateHandler(w http.ResponseWriter, r *http.Request)

UpdateHandler is the mux handler that dispatches Update requests to the broker's Interface.

Jump to

Keyboard shortcuts

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