Documentation

Index

Constants

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

func NewBinder() echo.Binder

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

Types

This section is empty.