helper

package
v0.0.0-...-c448931 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(normal, hashed string) bool

CheckPassword check password

func Config

func Config() *structure.Config

Config from json

func CreateRandomString

func CreateRandomString(length int) string

CreateRandomString With Length

func GetJwtToken

func GetJwtToken(id int) (string, error)

GetJwtToken with id

func HashAndSalt

func HashAndSalt(origin string) string

HashAndSalt password

func LoadConfig

func LoadConfig(configPath string) (structure.Config, error)

LoadConfig requires config path. returns DB Configuration and error

func SendResetPasswordMail

func SendResetPasswordMail(verifyCode, mail string) error

SendResetPasswordMail returns error(Success of fail)

func SendVefiryMail

func SendVefiryMail(verifyCode, mail string) error

SendVefiryMail send mail with verify link

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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