Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiddleware ¶
func NewMiddleware(opts ...Option) bunrouter.MiddlewareFunc
Types ¶
type Option ¶
type Option func(m *middleware)
func FromEnv ¶
WithEnv configures the middleware using the environment variable value. For example, WithEnv("BUNDEBUG"):
- BUNDEBUG=0 - disables the middleware.
- BUNDEBUG=1 - enables the middleware.
- BUNDEBUG=2 - enables the middleware and verbose mode.
func WithVerbose ¶
WithVerbose configures the middleware to log all requests.
Click to show internal directories.
Click to hide internal directories.