httpmw

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachBuildInfo

func AttachBuildInfo(next http.Handler) http.Handler

AttachBuildInfo adds a build info header to each HTTP request.

func AttachRequestID

func AttachRequestID(next http.Handler) http.Handler

AttachRequestID adds a request ID to each HTTP request.

func Logger

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

func RateLimitPerMinute

func RateLimitPerMinute(count int) func(http.Handler) http.Handler

RateLimitPerMinute returns a handler that limits requests per-minute based on IP and endpoint.

func Recover

func Recover(log slog.Logger) func(h http.Handler) http.Handler

func RequestID

func RequestID(r *http.Request) uuid.UUID

RequestID returns the ID of the request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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