Documentation
¶
Overview ¶
Package middleware contains middleware that can be added to request processing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// The processor run as part of the middlware.
Processor Processor
// Normally, middleware is not run after a prior middleware has generated a response.
// The Always flag can be used to override this behaviour and always run a middleware.
Always bool
}
A Middleware is a processor with some associated metadata.
func WithMiddlewares ¶
func WithMiddlewares(responseFn Processor) []Middleware
WithMiddleware takes a Processor and adds pre- and postprocessing middleware to it.
Click to show internal directories.
Click to hide internal directories.