middleware

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register deprecated added in v0.6.0

func Register(names []string, handler CreateMiddlewareHandler) error

Register registers a legacy middleware handler.

Deprecated: use RegisterTyped instead.

func RegisterTyped added in v0.8.0

func RegisterTyped[T any](names []string, handler func(T) (app.HandlerFunc, error)) error

RegisterTyped registers a middleware with a strongly typed config struct. It automatically handles the decoding of generic params (map[string]any) into struct T.

Types

type CreateMiddlewareHandler

type CreateMiddlewareHandler func(param any) (app.HandlerFunc, error)

func Factory added in v0.6.0

func Factory(kind string) CreateMiddlewareHandler

Jump to

Keyboard shortcuts

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