Documentation ¶
Overview ¶
Package api contains logic for building the Service Manager API business logic
Index ¶
- func New(ctx context.Context, e env.Environment, options *Options) (*web.API, error)
- type BaseController
- func (c *BaseController) CreateObject(r *web.Request) (*web.Response, error)
- func (c *BaseController) DeleteObjects(r *web.Request) (*web.Response, error)
- func (c *BaseController) DeleteSingleObject(r *web.Request) (*web.Response, error)
- func (c *BaseController) GetOperation(r *web.Request) (*web.Response, error)
- func (c *BaseController) GetSingleObject(r *web.Request) (*web.Response, error)
- func (c *BaseController) ListObjects(r *web.Request) (*web.Response, error)
- func (c *BaseController) PatchObject(r *web.Request) (*web.Response, error)
- func (c *BaseController) Routes() []web.Route
- type HTTPHandler
- type OperationsController
- type Options
- type ServiceBindingController
- type ServiceInstanceController
- type ServiceOfferingController
- type ServicePlanController
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseController ¶ added in v0.2.0
type BaseController struct { DefaultPageSize int MaxPageSize int // contains filtered or unexported fields }
BaseController provides common CRUD handlers for all object types in the service manager
func NewAsyncController ¶ added in v0.9.8
func NewAsyncController(ctx context.Context, options *Options, resourceBaseURL string, objectType types.ObjectType, isAsyncDefault bool, objectBlueprint func() types.Object) *BaseController
NewAsyncController returns a new base controller with a scheduler making it effectively an async controller
func NewController ¶ added in v0.2.0
func NewController(ctx context.Context, options *Options, resourceBaseURL string, objectType types.ObjectType, objectBlueprint func() types.Object) *BaseController
NewController returns a new base controller
func (*BaseController) CreateObject ¶ added in v0.2.0
CreateObject handles the creation of a new object
func (*BaseController) DeleteObjects ¶ added in v0.2.0
DeleteObjects handles the deletion of the objects specified in the request
func (*BaseController) DeleteSingleObject ¶ added in v0.2.0
DeleteSingleObject handles the deletion of the object with the id specified in the request
func (*BaseController) GetOperation ¶ added in v0.9.7
GetOperation handles the fetching of a single operation with the id specified for the specified resource
func (*BaseController) GetSingleObject ¶ added in v0.2.0
GetSingleObject handles the fetching of a single object with the id specified in the request
func (*BaseController) ListObjects ¶ added in v0.2.0
ListObjects handles the fetching of all objects
func (*BaseController) PatchObject ¶ added in v0.2.0
PatchObject handles the update of the object with the id specified in the request
func (*BaseController) Routes ¶ added in v0.2.0
func (c *BaseController) Routes() []web.Route
Routes returns the common set of routes for all objects
type HTTPHandler ¶
HTTPHandler converts a pkg/web.Handler and pkg/web.HandlerFunc to a standard http.Handler
func NewHTTPHandler ¶
func NewHTTPHandler(handler web.Handler, requestBodyMaxSize int) *HTTPHandler
NewHTTPHandler creates a new HTTPHandler from the provided web.Handler
func (*HTTPHandler) ServeHTTP ¶
func (h *HTTPHandler) ServeHTTP(res http.ResponseWriter, req *http.Request)
ServeHTTP implements the http.Handler interface and allows wrapping web.Handlers into http.Handlers
type OperationsController ¶ added in v0.12.0
type OperationsController struct {
*BaseController
}
OperationsController implements api.Controller by providing operations API logic
func NewOperationsController ¶ added in v0.12.0
func NewOperationsController(ctx context.Context, options *Options) *OperationsController
NewOperationsController returns a new controller for operations api
func (*OperationsController) Routes ¶ added in v0.12.0
func (c *OperationsController) Routes() []web.Route
type Options ¶ added in v0.3.0
type Options struct { Repository storage.TransactionalRepository APISettings *Settings OperationSettings *operations.Settings WSSettings *ws.Settings Notificator storage.Notificator WaitGroup *sync.WaitGroup }
type ServiceBindingController ¶ added in v0.10.0
type ServiceBindingController struct {
*BaseController
}
ServiceBindingController implements api.Controller by providing service bindings API logic
func NewServiceBindingController ¶ added in v0.10.0
func NewServiceBindingController(ctx context.Context, options *Options) *ServiceBindingController
func (*ServiceBindingController) Routes ¶ added in v0.10.0
func (c *ServiceBindingController) Routes() []web.Route
type ServiceInstanceController ¶ added in v0.9.0
type ServiceInstanceController struct {
*BaseController
}
ServiceInstanceController implements api.Controller by providing service Instances API logic
func NewServiceInstanceController ¶ added in v0.9.0
func NewServiceInstanceController(ctx context.Context, options *Options) *ServiceInstanceController
func (*ServiceInstanceController) Routes ¶ added in v0.9.0
func (c *ServiceInstanceController) Routes() []web.Route
type ServiceOfferingController ¶ added in v0.2.0
type ServiceOfferingController struct {
*BaseController
}
ServiceOfferingController implements api.Controller by providing service offerings API logic
func NewServiceOfferingController ¶ added in v0.2.0
func NewServiceOfferingController(ctx context.Context, options *Options) *ServiceOfferingController
func (*ServiceOfferingController) Routes ¶ added in v0.2.0
func (c *ServiceOfferingController) Routes() []web.Route
type ServicePlanController ¶ added in v0.2.0
type ServicePlanController struct {
*BaseController
}
ServicePlanController implements api.Controller by providing service plans API logic
func NewServicePlanController ¶ added in v0.2.0
func NewServicePlanController(ctx context.Context, options *Options) *ServicePlanController
func (*ServicePlanController) Routes ¶ added in v0.2.0
func (c *ServicePlanController) Routes() []web.Route
type Settings ¶
type Settings struct { TokenIssuerURL string `mapstructure:"token_issuer_url" description:"url of the token issuer which to use for validating tokens"` ClientID string `mapstructure:"client_id" description:"id of the client from which the token must be issued"` TokenBasicAuth bool `` /* 178-byte string literal not displayed */ ProtectedLabels []string `mapstructure:"protected_labels" description:"defines labels which cannot be modified/added by REST API requests"` OSBVersion string `mapstructure:"-"` MaxPageSize int `mapstructure:"max_page_size" description:"maximum number of items that could be returned in a single page"` DefaultPageSize int `mapstructure:"default_page_size" description:"default number of items returned in a single page if not specified in request"` }
Settings type to be loaded from the environment
func DefaultSettings ¶
func DefaultSettings() *Settings
DefaultSettings returns default values for API settings
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
extensions
|
|
Package healthcheck contains logic for the Service Manager healthcheck API
|
Package healthcheck contains logic for the Service Manager healthcheck API |
Package info contains logic for the Service Manager info API
|
Package info contains logic for the Service Manager info API |
Package osb contains logic for building the Service Manager OSB API
|
Package osb contains logic for building the Service Manager OSB API |