Documentation ¶
Index ¶
- func BlockLockedTenants() web.MiddlewareFunc
- func BlockPendingTenants() web.MiddlewareFunc
- func CORS() web.MiddlewareFunc
- func CatchPanic() web.MiddlewareFunc
- func Chain(mws ...web.MiddlewareFunc) web.MiddlewareFunc
- func CheckTenantPrivacy() web.MiddlewareFunc
- func ClientCache(d time.Duration) web.MiddlewareFunc
- func Compress() web.MiddlewareFunc
- func Instrumentation() web.MiddlewareFunc
- func IsAuthenticated() web.MiddlewareFunc
- func IsAuthorized(roles ...enum.Role) web.MiddlewareFunc
- func Maintenance() web.MiddlewareFunc
- func MultiTenant() web.MiddlewareFunc
- func RequireTenant() web.MiddlewareFunc
- func Secure() web.MiddlewareFunc
- func Session() web.MiddlewareFunc
- func SetLocale(locale string) web.MiddlewareFunc
- func SingleTenant() web.MiddlewareFunc
- func Tenant() web.MiddlewareFunc
- func User() web.MiddlewareFunc
- func WebSetup() web.MiddlewareFunc
- func WorkerSetup() worker.MiddlewareFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockLockedTenants ¶
func BlockLockedTenants() web.MiddlewareFunc
BlockLockedTenants blocks requests on locked tenants as they are in read-only mode
func BlockPendingTenants ¶
func BlockPendingTenants() web.MiddlewareFunc
BlockPendingTenants blocks requests for pending tenants
func CatchPanic ¶
func CatchPanic() web.MiddlewareFunc
func Chain ¶
func Chain(mws ...web.MiddlewareFunc) web.MiddlewareFunc
Chain combines multiple middlewares into one
func CheckTenantPrivacy ¶
func CheckTenantPrivacy() web.MiddlewareFunc
CheckTenantPrivacy blocks requests of unauthenticated users for private tenants
func ClientCache ¶
func ClientCache(d time.Duration) web.MiddlewareFunc
ClientCache adds Cache-Control header for X seconds
func Compress ¶
func Compress() web.MiddlewareFunc
Compress returns a middleware which compresses HTTP response using gzip compression
func Instrumentation ¶
func Instrumentation() web.MiddlewareFunc
Instrumentation adds Prometheus HTTP Middlewares
func IsAuthenticated ¶
func IsAuthenticated() web.MiddlewareFunc
IsAuthenticated blocks non-authenticated requests
func IsAuthorized ¶
func IsAuthorized(roles ...enum.Role) web.MiddlewareFunc
IsAuthorized blocks non-authorized requests
func Maintenance ¶
func Maintenance() web.MiddlewareFunc
Maintenance returns a maintenance page when system is under maintenance
func MultiTenant ¶
func MultiTenant() web.MiddlewareFunc
MultiTenant extract tenant information from hostname and inject it into current context
func RequireTenant ¶
func RequireTenant() web.MiddlewareFunc
RequireTenant returns 404 if tenant is not available
func Secure ¶
func Secure() web.MiddlewareFunc
Secure middleware is responsible for 1. Setting the HTTP Security Headers 2. Protecting from Host attacks
func Session ¶
func Session() web.MiddlewareFunc
Session starts a new Session if an Session ID is not yet set
func SetLocale ¶
func SetLocale(locale string) web.MiddlewareFunc
SetLocale defines given locale in context for all subsequent operations
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
func User ¶
func User() web.MiddlewareFunc
User gets JWT Auth token from cookie and insert into context
func WorkerSetup ¶
func WorkerSetup() worker.MiddlewareFunc
WorkerSetup current context with some services
Types ¶
This section is empty.