handlers

package
v0.10.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DisableResponseValidation is a flag indicating whether or not to
	// perform resposne validation.
	DisableResponseValidation = true
)
View Source
var OnRequest types.APIFunc

OnRequest is a handler to which an external provider can attach that is invoked for every incoming HTTP request.

Functions

func NewAuthAllSvcsHandler

func NewAuthAllSvcsHandler() types.Middleware

NewAuthAllSvcsHandler returns a new authAllSvcsHandler.

func NewAuthGlobalHandler

func NewAuthGlobalHandler(
	config *types.AuthConfig) types.Middleware

NewAuthGlobalHandler returns a new authGlobalHandler.

func NewAuthSvcHandler

func NewAuthSvcHandler() types.Middleware

NewAuthSvcHandler returns a new authSvcHandler.

func NewErrorHandler

func NewErrorHandler() types.Middleware

NewErrorHandler returns a new global HTTP filter for handling errors.

func NewInstanceIDHandler

func NewInstanceIDHandler(svcs <-chan types.StorageService) types.Middleware

NewInstanceIDHandler returns a new global HTTP filter for grokking the InstanceIDs from the headers

func NewLocalDevicesHandler

func NewLocalDevicesHandler() types.Middleware

NewLocalDevicesHandler returns a new global HTTP filter for grokking the local devices from the headers

func NewLoggingHandler

func NewLoggingHandler(
	w io.Writer,
	logHTTPRequests, logHTTPResponses bool) types.Middleware

NewLoggingHandler instantiates a new instance of the loggingHandler type.

func NewOnRequestHandler

func NewOnRequestHandler() types.Middleware

NewOnRequestHandler is a handler.

func NewPostArgsHandler

func NewPostArgsHandler(config gofig.Config) types.Middleware

NewPostArgsHandler returns a new filter for injecting the store with the POST object's fields and additional options.

func NewQueryParamsHandler

func NewQueryParamsHandler() types.Middleware

NewQueryParamsHandler returns a new filter for injecting the store with query parameters

func NewSchemaValidator

func NewSchemaValidator(
	reqSchema, resSchema []byte,
	newReqObjFunc func() interface{}) types.Middleware

NewSchemaValidator returns a new filter for validating request payloads and response payloads against defined JSON schemas.

func NewServiceValidator

func NewServiceValidator() types.Middleware

NewServiceValidator returns a new filter for validating that the service specified as part of the path is valid.

func NewStorageSessionHandler

func NewStorageSessionHandler() types.Middleware

NewStorageSessionHandler returns a new filter for ensuring that a storage session is injected for routes that request it.

func NewTransactionHandler

func NewTransactionHandler() types.Middleware

NewTransactionHandler returns a new global HTTP filter for grokking the transaction info from the headers

Types

This section is empty.

Jump to

Keyboard shortcuts

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