utils

package
v0.0.0-...-8554a42 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashedPassword

func CompareHashedPassword(hashedPassword string, password string) (ok bool)

func CreateToken

func CreateToken(claims ClaimsJwt) (token string, err error)

func EncryptPassword

func EncryptPassword(password string) (string, error)

func ErrorDatabase

func ErrorDatabase(dbType string, err error)

func ErrorEndPoint

func ErrorEndPoint(endPoint string, err error)

func SendEmail

func SendEmail(email *NewEmail, bodyHtml string) (bool, error)

Types

type ClaimsJwt

type ClaimsJwt struct {
	Id uint
	jwt.RegisteredClaims
}

func DecodedToken

func DecodedToken(token string) (claims *ClaimsJwt, err error)

type NewEmail

type NewEmail struct {
	From    string
	To      string
	Subject string
}

Jump to

Keyboard shortcuts

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