api

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: Apache-2.0, BSD-3-Clause, MIT Imports: 22 Imported by: 0

Documentation

Overview

Package api contains logic for building the Service Manager API business logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, repository storage.Repository, settings *Settings, encrypter security.Encrypter) (*web.API, error)

New returns the minimum set of REST APIs needed for the Service Manager

Types

type HTTPHandler

type HTTPHandler struct {
	Handler web.Handler
	// contains filtered or unexported fields
}

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) Handle

func (h *HTTPHandler) Handle(req *web.Request) (resp *web.Response, err error)

Handle implements the web.Handler interface

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 Settings

type Settings struct {
	TokenIssuerURL    string `mapstructure:"token_issuer_url"`
	ClientID          string `mapstructure:"client_id"`
	SkipSSLValidation bool   `mapstructure:"skip_ssl_validation"`
	TokenBasicAuth    bool   `mapstructure:"token_basic_auth"`
}

Settings type to be loaded from the environment

func DefaultSettings

func DefaultSettings() *Settings

DefaultSettings returns default values for API settings

func (*Settings) Validate

func (s *Settings) Validate() error

Validate validates the API settings

Directories

Path Synopsis
Package broker contains logic for building the Service Manager Broker Management API
Package broker contains logic for building the Service Manager Broker Management API
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
Package platform contains logic for the Service Manager Platform Management API
Package platform contains logic for the Service Manager Platform Management API
Package service_offering contains logic for building the Service Manager service offerings API
Package service_offering contains logic for building the Service Manager service offerings API
Package service_plan contains logic for building the Service Manager service plans API
Package service_plan contains logic for building the Service Manager service plans API
Package visibility contains logic for building the Service Manager visibilities API
Package visibility contains logic for building the Service Manager visibilities API

Jump to

Keyboard shortcuts

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