middleware

package
v0.0.0-...-ff84f7d Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePassword

func ComparePassword(password string, hashPass []byte) bool

func GenerateHash

func GenerateHash(password string) ([]byte, error)

func GetErrorString

func GetErrorString(err error) string

func IsValidRole

func IsValidRole(role []string) bool

func Logger

func Logger(next echo.HandlerFunc) echo.HandlerFunc

func VerifyTokenRole

func VerifyTokenRole(tk, role string) (bool, error)

Types

type UserClaims

type UserClaims struct {
	jwt.RegisteredClaims
	User_ID string `json:"user_id"`
}

type Validator

type Validator struct {
	// contains filtered or unexported fields
}
var Val Validator

func (Validator) Validate

func (u Validator) Validate(i interface{}) error

Jump to

Keyboard shortcuts

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