echoutils

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateResponse

func GenerateResponse(status int, c echo.Context, data interface{}, meta *models.Metadata)

GenerateResponse generates a response for the api

func GetClaims

func GetClaims(c echo.Context) (models.ISClaims, error)

GetClaims returns info out of jwt token

func GetRoles

func GetRoles(c echo.Context) []string

GetRoles returns the roles for the user

func IsInRole

func IsInRole(c echo.Context, role string) bool

IsInRole returns if a user is in specified Role

Types

This section is empty.

Jump to

Keyboard shortcuts

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