middleware

package
v0.0.0-...-c42f008 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recover

func Recover(next http.Handler) http.Handler

func SecuredCheck

func SecuredCheck(next http.Handler) http.Handler

Types

type Chain

type Chain struct {
	// contains filtered or unexported fields
}

Chain is a helper to build up a pipeline of middlewares, then apply them to a final handler.

func (*Chain) Then

func (c *Chain) Then(h http.Handler) http.Handler

Then applies the entire chain of middlewares to the final handler in reverse order.

func (*Chain) Use

func (c *Chain) Use(m Middleware)

Use appends a middleware to the chain.

type Middleware

type Middleware func(http.Handler) http.Handler

Middleware is a function that wraps an http.Handler with custom logic.

Jump to

Keyboard shortcuts

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