Documentation ¶
Index ¶
- func ClientCache(d time.Duration) web.MiddlewareFunc
- func Compress() web.MiddlewareFunc
- func HostChecker(baseURL string) web.MiddlewareFunc
- func IsAuthenticated() web.MiddlewareFunc
- func IsAuthorized(roles ...models.Role) web.MiddlewareFunc
- func JwtGetter() web.MiddlewareFunc
- func JwtSetter() web.MiddlewareFunc
- func MultiTenant() web.MiddlewareFunc
- func Noop() web.MiddlewareFunc
- func OnlyActiveTenants() web.MiddlewareFunc
- func SingleTenant() web.MiddlewareFunc
- func Tenant() web.MiddlewareFunc
- func WebSetup(logger log.Logger) web.MiddlewareFunc
- func WorkerSetup(logger log.Logger) worker.MiddlewareFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientCache ¶ added in v0.9.0
func ClientCache(d time.Duration) web.MiddlewareFunc
ClientCache adds Cache-Control header for X seconds
func Compress ¶ added in v0.7.0
func Compress() web.MiddlewareFunc
Compress returns a middleware which compresses HTTP response using gzip compression
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 ...models.Role) 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 OnlyActiveTenants ¶ added in v0.6.0
func OnlyActiveTenants() web.MiddlewareFunc
OnlyActiveTenants blocks requests for inactive tenants
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 WebSetup ¶ added in v0.10.0
func WebSetup(logger log.Logger) web.MiddlewareFunc
WebSetup current context with some services
func WorkerSetup ¶ added in v0.10.0
func WorkerSetup(logger log.Logger) worker.MiddlewareFunc
WorkerSetup current context with some services
Types ¶
This section is empty.