package
Version:
v0.0.6
Opens a new window with list of versions in this module.
Published: Nov 2, 2023
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
CheckToken
@Description: 验证token是否有效,当token无效或过期时,返回false
@param tokenString
@return bool
GenerateToken
@Description: 生成Token
@param content token的内容
@param ttl 生存时间 单位小时
@return string
@return error
type Content struct {
Id uint64 `json:"i"`
Roles []int `json:"r"`
Customs map[string]interface{} `json:"c"`
}
AnalyseToken
@Description: 解析Token
@param tokenString
@return *T
@return error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.