Help us shape the future of Go! Take the 2026 Go Developer Survey

middleware

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginsRoot = root + ".plugins"
)

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func NewAnyErrorWrapper

func NewAnyErrorWrapper[R any](ctx context.Context, plugins ...func(ctx context.Context, name string) middleware.AnyErrorMiddleware[R]) (*middleware.AnyErrorWrapper[R], error)

func NewAnyErrorWrapperWithOptions

func NewAnyErrorWrapperWithOptions[R any](ctx context.Context, options *Options, plugins ...func(ctx context.Context, name string) middleware.AnyErrorMiddleware[R]) (*middleware.AnyErrorWrapper[R], error)

func NewAnyErrorWrapperWithPath

func NewAnyErrorWrapperWithPath[R any](ctx context.Context, path string, plugins ...func(ctx context.Context, name string) middleware.AnyErrorMiddleware[R]) (*middleware.AnyErrorWrapper[R], error)

func NewAnyWrapper

func NewAnyWrapper[R any](ctx context.Context, plugins ...func(ctx context.Context, name string) middleware.AnyMiddleware[R]) (*middleware.AnyWrapper[R], error)

func NewAnyWrapperWithOptions

func NewAnyWrapperWithOptions[R any](ctx context.Context, options *Options, plugins ...func(ctx context.Context, name string) middleware.AnyMiddleware[R]) (*middleware.AnyWrapper[R], error)

func NewAnyWrapperWithPath

func NewAnyWrapperWithPath[R any](ctx context.Context, path string, plugins ...func(ctx context.Context, name string) middleware.AnyMiddleware[R]) (*middleware.AnyWrapper[R], error)

func NewErrorWrapper

func NewErrorWrapper(ctx context.Context, plugins ...func(ctx context.Context, name string) middleware.ErrorMiddleware) (*middleware.ErrorWrapper, error)

func NewErrorWrapperWithOptions

func NewErrorWrapperWithOptions(ctx context.Context, options *Options, plugins ...func(ctx context.Context, name string) middleware.ErrorMiddleware) (*middleware.ErrorWrapper, error)

func NewErrorWrapperWithPath

func NewErrorWrapperWithPath(ctx context.Context, path string, plugins ...func(ctx context.Context, name string) middleware.ErrorMiddleware) (*middleware.ErrorWrapper, error)

Types

type Options

type Options struct {
	Name string
}

Options struct which represents cors plugin from chi options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

Jump to

Keyboard shortcuts

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