Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLogLevel ¶
WithLogLevel is a convenience function to easily write the functional options for each handler.
Types ¶
type MWBase ¶
type MWBase struct {
// contains filtered or unexported fields
}
MWBase contains the basic middleware information common to each midgard handler.
func (*MWBase) SetLogLevel ¶
SetLogLevel sets the new log level to use.
type MWBaser ¶
type MWBaser interface { // GetMWBase gets the MWBase structure out of a midgard handler. GetMWBase() *MWBase }
MWBaser is the interface used to get the basic middleware information as defined in MWBase.
type Middleware ¶
Middleware represents the common type of http middleware. The idea is to have a common interface for all types of middlewares, that is, they get an input handler and return an output handler, that is extended by the middlewares functionality. Customization is done in generator functions, that take parameters to modify the behaviour of the final http.Handler, e.g. methods to allow.