utils

package
v0.0.0-...-398d8f0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(hashedPassword string, password string) bool

CheckPasswordHash checks whether the password matchs the given hashed string

func DBValidateExists

func DBValidateExists(db *sqlx.DB, value interface{}, table string, col string) bool

DBValidateExists checks if the given value in a database already exists

func GenerateJWT

func GenerateJWT(id uint64, email string) string

GenerateJWT returns new token string

func HashPassword

func HashPassword(password string) string

HashPassword returns hashed password of the given string

func VerifyJWT

func VerifyJWT(token string) (interface{}, error)

VerifyJWT checks whether the given token is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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