middleware

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware interface {
	Method() func(http.Handler) http.Handler
	// Status returns whether the middleware is enabled
	Status() bool
	// Experimental returns whether the middleware is experimental
	Experimental() bool
}

func NewMiddleware

func NewMiddleware(method func(http.Handler) http.Handler, status bool, experimental bool, opts ...MiddlewareWrapper) Middleware

NewMiddleware initializes a new local middleware for the server.

type MiddlewareWrapper

type MiddlewareWrapper func(r Middleware) Middleware

MiddlewareWrapper wraps a middleware with extra functionality. It is passed in when creating a new middleware.

Jump to

Keyboard shortcuts

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