grapper

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 4 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 added in v1.3.2

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

func NewAnyErrorWrapperWithOptions added in v1.3.2

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

func NewAnyErrorWrapperWithPath added in v1.3.2

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

func NewAnyWrapper added in v1.3.2

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

func NewAnyWrapperWithOptions added in v1.3.2

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

func NewAnyWrapperWithPath added in v1.3.2

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

func NewErrorWrapper added in v1.3.2

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

func NewErrorWrapperWithOptions added in v1.3.2

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

func NewErrorWrapperWithPath added in v1.3.2

func NewErrorWrapperWithPath(ctx context.Context, path string, plugins ...func(ctx context.Context, name string) grapper.ErrorMiddleware) (*grapper.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