middleware

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceIdKey       = "trace_id"
	SubKey           = "sub"
	NameKey          = "name"
	NicknameKey      = "nickname"
	EmailKey         = "email"
	EmailVerifiedKey = "email_verified"
	PictureKey       = "picture"
	RolesKey         = "roles"
	OrgIdKey         = "org_id"
)

Variables

This section is empty.

Functions

func NewMiddleware added in v0.1.1

func NewMiddleware(l logger.Logger) *middleware

Types

type Middleware

type Middleware interface {
	Chain(middlewares ...middlewares) middlewares
	LogRequest(next http.Handler) http.Handler
	RecoverPanic(next http.Handler) http.Handler
	AddTraceIdFromHeaderToContext(next http.Handler) http.Handler
	AddUserInfoFromHeaderToContext(next http.Handler) http.Handler
	AddOrgIdFromHeaderToContext(next http.Handler) http.Handler
}

Jump to

Keyboard shortcuts

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