ATservices

package
v0.0.0-...-574c6f2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Redis_client *redis.Client

For Redis services

Functions

func AddUserWithoutCheck

func AddUserWithoutCheck(holeuser ATmodels.AuthUser)

func ChangePassword

func ChangePassword(email_aes string, oldPassword string, newPassword string) (result bool)

func GetRoleWhileLogin

func GetRoleWhileLogin(email_aes string) (role string)

func IsEmailActive

func IsEmailActive(encrypted_email string) (IsActive bool)

encrypted_email is the cipher after encrypting email,pay attention to passing email with encryption

func IsEmailAndPasswordMatch

func IsEmailAndPasswordMatch(email string, pwd string) (isEmailAndPasswordMatch bool)

Email is the chiper and pwd is plaintext which will be hashed in function

func IsEmailRegistered

func IsEmailRegistered(encrypted_email string) (IsRegistered bool)

encrypted_email is the cipher after encrypting email,pay attention to passing email with encryption

func IsVerifyCodeMatchToRegisterAccount

func IsVerifyCodeMatchToRegisterAccount(verifyCode string, email string) (IsMatch bool)

Check if verify code and user specified by email inputs are match

func JoinHoleTime

func JoinHoleTime(email_aes string) (day int)

func RemoveVerifyFromRedis

func RemoveVerifyFromRedis(email string)

func ResetUserPassword

func ResetUserPassword(email string, passwordHash string) (err error)

func SendEmail

func SendEmail(toEmail string, verifyCode string) (isfinished bool)

func StoreEmailAndVerifyCodeInRedis

func StoreEmailAndVerifyCodeInRedis(verifyCode string, email string)

func VerifyEmailActive

func VerifyEmailActive(encrypted_email string)

encrypted_email is the cipher after encrypting email,pay attention to passing email with encryption

Types

This section is empty.

Jump to

Keyboard shortcuts

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