middleware

package
v5.2.5+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AUTH_PROXY_SESSION_VAR = "authProxyHeaderValue"

Functions

func AddDefaultResponseHeaders

func AddDefaultResponseHeaders() macaron.Handler

func AddRenderAuthKey

func AddRenderAuthKey(orgId int64, userId int64, orgRole m.RoleType) string

func Auth

func Auth(options *AuthOptions) macaron.Handler

func GetContextHandler

func GetContextHandler() macaron.Handler

func Gziper

func Gziper() macaron.Handler

func Logger

func Logger() macaron.Handler

func MeasureRequestTime

func MeasureRequestTime() macaron.Handler

func OrgRedirect

func OrgRedirect() macaron.Handler

func Quota

func Quota(target string) macaron.Handler

func Recovery

func Recovery() macaron.Handler

Recovery returns a middleware that recovers from any panics and writes a 500 if there was one. While Martini is in development mode, Recovery will also output the panic as HTML.

func RedirectFromLegacyDashboardSoloURL

func RedirectFromLegacyDashboardSoloURL() macaron.Handler

func RedirectFromLegacyDashboardURL

func RedirectFromLegacyDashboardURL() macaron.Handler

func RemoveRenderAuthKey

func RemoveRenderAuthKey(key string)

func RequestMetrics

func RequestMetrics(handler string) macaron.Handler

func RequestTracing

func RequestTracing(handler string) macaron.Handler

func RoleAuth

func RoleAuth(roles ...m.RoleType) macaron.Handler

func Sessioner

func Sessioner(options *ms.Options, sessionConnMaxLifetime int64) macaron.Handler

func ValidateHostHeader

func ValidateHostHeader(domain string) macaron.Handler

Types

type AuthOptions

type AuthOptions struct {
	ReqGrafanaAdmin bool
	ReqSignedIn     bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL