libs

package
v0.0.0-...-d636fa7 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPass

func CheckPass(hassPassword, passwordDb string) bool

func HashPassword

func HashPassword(pass string) (string, error)

func Validation

func Validation(email, pass string) error

Types

type Claims

type Claims struct {
	Email string
	Role  string
	jwt.StandardClaims
}

func CheckToken

func CheckToken(token string) (*Claims, error)

func NewToken

func NewToken(email, role string) *Claims

func (*Claims) Create

func (c *Claims) Create() (string, error)

type Response

type Response struct {
	Code        int         `json:"-"`
	Status      string      `json:"status"`
	IsError     bool        `json:"isError"`
	Data        interface{} `json:"data,omitempty"`
	Description interface{} `json:"description,omitempty"`
}

func New

func New(data interface{}, code int, isError bool) *Response

func (*Response) Send

func (res *Response) Send(c *gin.Context)

Jump to

Keyboard shortcuts

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