Documentation ¶
Index ¶
- func AnonymousTokenEncrypt(userType int32, userID int64, expireTime int64) string
- func GenCode(length int) string
- func GetCode(bizType, tel string) (code string, err error)
- func InitRedisStore(Config *configs.ServerConfig) (err error)
- func SaveCode(bizType, tel, code string, expires time.Duration) (err error)
- func SmsSend(tel, code string) (reason string, err error)
- func TokenCheck(token string, userID int64, userType int32, platform string) (err error)
- func TokenDecrypt(token string) (userType int32, userID int64, expireTime int64, err error)
- func TokenDelete(userID int64, token string) (err error)
- func TokenEncrypt(userType int32, userID int64, expireTime int64) string
- func TokenSave(token string, userID int64, userType int32, platform string, ...) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnonymousTokenEncrypt ¶
AnonymousTokenEncrypt 匿名用户token加密.
func InitRedisStore ¶
func InitRedisStore(Config *configs.ServerConfig) (err error)
InitRedisStore 初始化Redis存储.
func TokenCheck ¶
TokenCheck 检查Token是否存在,
func TokenDecrypt ¶
TokenDecrypt token解密
func TokenEncrypt ¶
TokenEncrypt token加密
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.