middleware

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKey = contextKey("request-id")
View Source
const HeaderKey = "X-Request-Id"

Variables

This section is empty.

Functions

func CleanMultipart

func CleanMultipart(next http.Handler) http.Handler

func GetRequestID

func GetRequestID(r *http.Request) (string, bool)

func RequestID

func RequestID(next http.Handler) http.Handler

func RequestIDField added in v0.2.0

func RequestIDField(ctx context.Context) slog.Attr

func WithLogging added in v0.2.0

func WithLogging(log xlog.Logger) func(http.Handler) http.Handler

Logging performs request logging. This method takes heavy inspiration from (github.com/gorilla/handlers).CombinedLoggingHandler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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