Documentation ¶
Index ¶
- Variables
- func NewErrorHandler() types.Middleware
- func NewInstanceIDHandler() types.Middleware
- func NewLocalDevicesHandler() types.Middleware
- func NewLoggingHandler(w io.Writer, logHTTPRequests, logHTTPResponses bool) types.Middleware
- func NewOnRequestHandler() types.Middleware
- func NewPostArgsHandler() types.Middleware
- func NewQueryParamsHandler() types.Middleware
- func NewSchemaValidator(reqSchema, resSchema []byte, newReqObjFunc func() interface{}) types.Middleware
- func NewServiceValidator() types.Middleware
- func NewStorageSessionHandler() types.Middleware
- func NewTransactionHandler() types.Middleware
Constants ¶
This section is empty.
Variables ¶
var ( // DisableResponseValidation is a flag indicating whether or not to // perform resposne validation. DisableResponseValidation = true )
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.