Documentation ¶
Overview ¶
Package middlewares provides common middleware handlers.
Index ¶
- func CSRFMiddleware(useHTTPS bool, salt string) func(http.Handler) http.Handler
- func MustBeMember(next http.Handler) http.Handler
- func MustLogin(next http.Handler) http.Handler
- func MustLoginApi(next http.Handler) http.Handler
- func MustLoginApiStream(next http.Handler) http.Handler
- func SetAccessTokens(next http.Handler) http.Handler
- func SetClusters(next http.Handler) http.Handler
- func SetContext(ctx context.Context) func(http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CSRFMiddleware ¶
CSRFMiddleware is a constructor that creates github.com/gorilla/csrf.CSRF struct
func MustLoginApi ¶
MustLoginApi is a middleware that checks /api login.
func MustLoginApiStream ¶
MustLoginApiStream is a middleware that checks /api/.../stream login.
func SetAccessTokens ¶
SetAccessTokens sets clusters data in context based on logged in user ID.
func SetClusters ¶
SetClusters sets clusters data in context based on logged in user ID.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.