middleware

package
v1.1.72 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recovery

func Recovery(next http.Handler) http.Handler

func RecoveryTracer

func RecoveryTracer(next http.Handler) http.Handler

func SetupMiddleware

func SetupMiddleware(route *chi.Mux, config *common_utils.BaseConfig)

func TraceHttp

func TraceHttp(next http.Handler) http.Handler

Types

type AuthMiddleware

type AuthMiddleware interface {
	CheckIsAuthenticated(handler http.Handler) http.Handler
	CheckIsRefresh(handler http.Handler) http.Handler
	CheckIsAdmin(handler http.Handler) http.Handler
}

func NewAuthMiddleware

func NewAuthMiddleware(jwt jwtMaker.JWT) AuthMiddleware

type AuthMiddlewareImpl

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

func (*AuthMiddlewareImpl) CheckIsAdmin

func (m *AuthMiddlewareImpl) CheckIsAdmin(next http.Handler) http.Handler

func (*AuthMiddlewareImpl) CheckIsAuthenticated

func (m *AuthMiddlewareImpl) CheckIsAuthenticated(next http.Handler) http.Handler

func (*AuthMiddlewareImpl) CheckIsRefresh

func (m *AuthMiddlewareImpl) CheckIsRefresh(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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