handlers

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2016 License: Apache-2.0 Imports: 24 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 NewErrorHandler

func NewErrorHandler() types.Middleware

NewErrorHandler returns a new global HTTP filter for handling errors.

func NewInstanceIDHandler

func NewInstanceIDHandler() 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() 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 added in v0.3.0

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