Documentation
¶
Overview ¶
Package middleware provides some middleware
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogMiddleware ¶
LogMiddleware is an middleware to log requests to rs/zerolog and catches panics. If it is added multiple times, only the first time sends entries to the log.
func RequireUser ¶
RequireUser is an middleware that looks if the user is an Anonymous user and redircts it to the login if so.
Types ¶
type Middleware ¶
Middleware is an type to Save data between executions and to provide help at the teardown.
type PostSetupMiddleware ¶ added in v0.4.1
type PostSetupMiddleware interface {
Middleware
PostSetup([]any) error
}
PostSetupMiddleware is for middleware that requires sites to be already configured
type PreSetupMiddleware ¶ added in v0.4.1
type PreSetupMiddleware interface {
Middleware
PreSetup([]any) error
}
PreSetupMiddleware is for middleware that only needs the sites after their initialization
Directories
¶
| Path | Synopsis |
|---|---|
|
Package db is an middleware that manages multiple database pools and provides applications with an way to access the database
|
Package db is an middleware that manages multiple database pools and provides applications with an way to access the database |
|
Package wellknown provides an middleware that lets sites to register themselfs to wellknown uris
|
Package wellknown provides an middleware that lets sites to register themselfs to wellknown uris |
Click to show internal directories.
Click to hide internal directories.