middleware

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(handler http.Handler, middleware ...Middleware) http.Handler

Apply returns handler with applied middlewares chain.

Types

type Middleware

type Middleware interface {
	Handle(w http.ResponseWriter, r *http.Request, next http.Handler)
}

Middleware can be used to attach additional behaviour for http.Handler

type MiddlewareFunc

type MiddlewareFunc func(w http.ResponseWriter, r *http.Request, next http.Handler)

func (MiddlewareFunc) Handle

func (f MiddlewareFunc) Handle(w http.ResponseWriter, r *http.Request, next http.Handler)

Jump to

Keyboard shortcuts

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