middleware

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(h http.Handler, middlewares ...Middleware) http.Handler

Chain applies a list of middleware in order to an http.Handler.

Types

type Middleware

type Middleware func(http.Handler) http.Handler

Middleware is a function that wraps an http.Handler with additional functionality.

func LoggingMiddleware

func LoggingMiddleware(logger *slog.Logger) Middleware

LoggingMiddleware wraps the handler, logs the request and response, and writes the response to the client.

Jump to

Keyboard shortcuts

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