middlewares

package
v0.0.0-...-ae01125 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagTime              = "time"
	TagPid               = "pid"
	TagReferer           = "referer"
	TagProtocol          = "protocol"
	TagIP                = "ip"
	TagIPs               = "ips"
	TagHost              = "host"
	TagMethod            = "method"
	TagPath              = "path"
	TagURL               = "url"
	TagUA                = "ua"
	TagLatency           = "latency"
	TagStatus            = "status"
	TagQueryStringParams = "query"
	TagReqBody           = "req_body"
	TagReqHeaders        = "req_headers"
	TagResBody           = "res_body"
	TagError             = "error"
	TagTraceID           = "trace_id"
)

Logger variables

View Source
const (
	// HeaderTraceID is the header key for trace id
	HeaderTraceID = "X-Request-ID"
)

Variables

This section is empty.

Functions

func NewLimiterHandler

func NewLimiterHandler(conf config.Server) fiber.Handler

NewLimiterHandler 创建限流器中间件

func NewSessionStore

func NewSessionStore(conf config.Redis) *session.Store

NewSessionStore 创建 session 存储

func NewSlogMiddleware

func NewSlogMiddleware() fiber.Handler

NewSlogMiddleware creates a new slog middleware handler

func NewTraceMiddleware

func NewTraceMiddleware() fiber.Handler

NewTraceMiddleware creates a new trace middleware handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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