middlewares

package
v0.0.0-...-9c9e09e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMiddleware

type AuthMiddleware struct {
	AuthPath       string
	ExcludedPaths  []string
	ProtectedPaths []string
	// contains filtered or unexported fields
}

func NewAuthMiddleware

func NewAuthMiddleware(redirectToAuthPath string, protectedPaths []string, excludedPaths []string, authHelper *helpers.AuthHelper) *AuthMiddleware

func (*AuthMiddleware) EnsureAuth

func (a *AuthMiddleware) EnsureAuth(next http.Handler) http.Handler

func (*AuthMiddleware) IsProtected

func (a *AuthMiddleware) IsProtected(path string) bool

type LogMiddleware

type LogMiddleware struct {
	// contains filtered or unexported fields
}

func NewLogMiddleware

func NewLogMiddleware(logger *log.Logger) *LogMiddleware

func (*LogMiddleware) LogRequests

func (l *LogMiddleware) LogRequests(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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