Documentation ¶
Index ¶
- func AddServices() web.MiddlewareFunc
- func HostChecker(baseURL string) web.MiddlewareFunc
- func IsAuthenticated() web.MiddlewareFunc
- func IsAuthorized(roles ...int) web.MiddlewareFunc
- func JwtGetter() web.MiddlewareFunc
- func JwtSetter() web.MiddlewareFunc
- func MultiTenant() web.MiddlewareFunc
- func Noop() web.MiddlewareFunc
- func OneYearCache() web.MiddlewareFunc
- func Setup(db *dbx.Database) web.MiddlewareFunc
- func SingleTenant() web.MiddlewareFunc
- func Tenant() web.MiddlewareFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddServices ¶
func AddServices() web.MiddlewareFunc
AddServices adds services to current context
func HostChecker ¶
func HostChecker(baseURL string) web.MiddlewareFunc
HostChecker checks for a specific host
func IsAuthenticated ¶
func IsAuthenticated() web.MiddlewareFunc
IsAuthenticated blocks non-authenticated requests
func IsAuthorized ¶
func IsAuthorized(roles ...int) web.MiddlewareFunc
IsAuthorized blocks non-authorized requests
func JwtGetter ¶
func JwtGetter() web.MiddlewareFunc
JwtGetter gets JWT token from cookie and insert into context
func MultiTenant ¶
func MultiTenant() web.MiddlewareFunc
MultiTenant extract tenant information from hostname and inject it into current context
func OneYearCache ¶
func OneYearCache() web.MiddlewareFunc
OneYearCache adds Cache-Control header for one year
func Setup ¶
func Setup(db *dbx.Database) web.MiddlewareFunc
Setup current context with some services
func SingleTenant ¶
func SingleTenant() web.MiddlewareFunc
SingleTenant inject default tenant into current context
func Tenant ¶
func Tenant() web.MiddlewareFunc
Tenant adds either SingleTenant or MultiTenant to the pipeline
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.