helper

package
v0.0.0-...-dfaa8e5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(err error, c echo.Context)

ErrorHandler generates an error message and saves it to the log The logger must be previously installed in the Echo context.

func GetRandString

func GetRandString(length int) string

GetRandString create and return random alphanumeric strings fixed length.

func GetSingleError

func GetSingleError(err error) validator.FieldError

GetSingleError returns the first error from the list of validation errors.

func GetTokenFromAuthHeader

func GetTokenFromAuthHeader(headers http.Header) (token *models.JwtClaim, err error)

func JsonError

func JsonError(ctx echo.Context, err *models.GeneralError) error

JsonError returns the JSON errors based on GeneralError model.

Types

This section is empty.

Jump to

Keyboard shortcuts

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