middleware

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UserIDKey is the key to store the user ID in the context
	UserIDKey contextKey = "userID"
)

Variables

This section is empty.

Functions

func Auth

func Auth(next http.Handler) http.Handler

Auth simple middleware acting as an API key verifier

func Logger

func Logger(next http.Handler) http.Handler

Logger logs the incoming request method, path and its duration

func Recovery

func Recovery(next http.Handler) http.Handler

Recovery catches panics and prevents the server from crashing

Types

This section is empty.

Jump to

Keyboard shortcuts

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