middleware

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeHandlerMiddleware

func SafeHandlerMiddleware(next http.Handler) http.Handler

Types

type LoggingMiddleware

type LoggingMiddleware struct {
	Logger  *slog.Logger
	Verbose bool
}

func (*LoggingMiddleware) Middleware

func (m *LoggingMiddleware) Middleware(next http.Handler) http.Handler

Middleware logs the incoming HTTP request & its duration.

type Middleware

type Middleware func(http.Handler) http.Handler

func Chain

func Chain(middleware ...Middleware) Middleware

type RateLimiterMiddleware

type RateLimiterMiddleware struct {
	Limiter *rate.Limiter
}

func (*RateLimiterMiddleware) Middleware

func (m *RateLimiterMiddleware) Middleware(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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