middlewares

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CurrentUserContextKey = "current_user"

CurrentUserContextKey is the key to retrieve the current_user from echo.Context.

Variables

This section is empty.

Functions

func CurrentUser

func CurrentUser(db database.Client) echo.MiddlewareFunc

CurrentUser checks current_user based on JWT and store it into echo.Context.

func HTTPErrorHandler

func HTTPErrorHandler(err error, c echo.Context)

HTTPErrorHandler is a middleware that formats rendered errors.

func NewBinder added in v0.4.1

func NewBinder() echo.Binder

NewBinder returns a wrapp of the default binder implementation with extra checks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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