middleware

package
v0.0.0-...-7815bce Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFactoryConfig = InjectFactoryConfig{
		Skipper: middleware.DefaultSkipper,
	}
)
View Source
var (
	ErrFactoryNotFound = errors.New("unable to find factory in provided context")
)

Functions

func GetFactory

func GetFactory(c echo.Context) (*model.Factory, error)

func InjectFactory

func InjectFactory() echo.MiddlewareFunc

func InjectFactoryWithConfig

func InjectFactoryWithConfig(config InjectFactoryConfig) echo.MiddlewareFunc

func MustGetFactory

func MustGetFactory(c echo.Context) *model.Factory

Types

type InjectFactoryConfig

type InjectFactoryConfig struct {
	// Skipper defines a function to skip middleware.
	Skipper middleware.Skipper

	// BeforeFunc defines a function which is executed just before the middleware.
	BeforeFunc middleware.BeforeFunc
}

Jump to

Keyboard shortcuts

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