echorouter

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error, ctx echo.Context)

Error implements the echo framework error interface. it does return error as a JSON object rather than just text.

func New

func New() *echo.Echo

func NewACRMidlw

func NewACRMidlw(requiredACR ajwt.ACRSecLvl, strict bool) echo.MiddlewareFunc

NewACRMidlw to handle ACR requirements for given routes

func NewJWTMidlw

func NewJWTMidlw(strict bool) echo.MiddlewareFunc

NewJWTMidlw return an echo middleware function which requires a valid Access JWT as an Authorization header. It raises an error if no JWT is provided or invalid, according to its strict parameter.

func NewLogger

func NewLogger() echo.MiddlewareFunc

NewLogger instantiates and returns a new Logger MiddlewareFunc for echo

func NewZerologLogger

func NewZerologLogger() echo.MiddlewareFunc

NewZerologLogger instantiates a zerolog Logger and add it to context

Types

type WrappedValidator

type WrappedValidator struct {
	// contains filtered or unexported fields
}

WrappedValidator wraps our enhanced Misakey validator around echo framework.

func NewWrappedValidator

func NewWrappedValidator(validator *validator.Enhanced) *WrappedValidator

NewWrappedValidator's constructor.

func (*WrappedValidator) Validate

func (wrapper *WrappedValidator) Validate(i interface{}) error

Validate implements the echo framework validator interface.

Jump to

Keyboard shortcuts

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