middleware

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogErrKey   = "error"
	PanicErrKey = "panic"
)

Functions

func ApplyMiddleware

func ApplyMiddleware(logger *log.Logger, handler http.Handler) http.Handler

ApplyMiddleware wraps a handler with the default middleware stack.

func CORS

func CORS() func(http.Handler) http.Handler

func Logging

func Logging(logger *log.Logger) func(http.Handler) http.Handler

func Recovery

func Recovery() func(http.Handler) http.Handler

func SetLoggingMetadata

func SetLoggingMetadata(ctx context.Context, key string, value any)

Types

type LoggingMetadata

type LoggingMetadata map[string]any

func GetLoggingMetadata

func GetLoggingMetadata(ctx context.Context) LoggingMetadata

type LoggingMetadataKey

type LoggingMetadataKey struct{}

Jump to

Keyboard shortcuts

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