middleware

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain added in v0.0.7

func Chain(next http.Handler, ms ...Middleware) http.Handler

Chain creates a chain of HTTP middleware functions to wrap around a http.Handler. It applies each middleware in the order they are provided, allowing for layered processing of HTTP requests and responses.

func ExactPath

func ExactPath(path string, next http.Handler) http.Handler

func Logging added in v0.0.8

func Logging(log logger.Logger) func(http.Handler) http.Handler

Logging creates a logging middleware with a custom logger

func Sessioned

func Sessioned(e session.Engine) func(http.Handler) http.Handler

Types

type Middleware added in v0.0.7

type Middleware func(http.Handler) http.Handler

Middleware represents a function that can wrap a http.Handler with additional functionality. It takes a http.Handler and returns a new http.Handler that includes the middleware's behavior.

Jump to

Keyboard shortcuts

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