Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenDB ¶
func (*TokenDB) GetByToken ¶
GetByToken 通过token查询用户id
查询错误的两种情况: token不存或已失效返回 userID=0 err!=nil token查询失败返回 userID=-1 err!=nil
func (*TokenDB) GetByTokenRedis ¶
GetByTokenRedis 通过token查询用户id
查询错误的两种情况: token不存或已失效返回 userID=0 err!=nil token查询失败返回 userID=-1 err!=nil
func (*TokenDB) Insert ¶
Insert 获取用户token,每次创建一个新的token
Click to show internal directories.
Click to hide internal directories.