middleware

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const RequestIDKey contextKey = "request-id"

RequestIDKey is the context key for request IDs.

Variables

This section is empty.

Functions

func Logger

func Logger(log zerolog.Logger) func(next http.Handler) http.Handler

Logger provides structured access logging for HTTP requests.

func Recover

func Recover(log zerolog.Logger) func(next http.Handler) http.Handler

Recover guards the server from panics and logs the stack trace.

func RequestID

func RequestID() func(http.Handler) http.Handler

RequestID middleware adds a unique request ID to each request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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