Documentation
¶
Index ¶
- func GenerateToken(userId int64, security string, role int64, expireTime time.Time, issure string) (string, error)
- func GetRootPath(myPath string) string
- func JsonToStruct(str string, value interface{}) error
- func StructToJson(value interface{}) (string, error)
- func StructToMap(value interface{}) map[string]interface{}
- type MyClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
func GenerateToken(userId int64, security string, role int64, expireTime time.Time, issure string) (string, error)
GenerateToken
@Description: 生成token @param userId 用户id @param security 加密字符串 @param role 用户角色 @param expireTime 过期时间 @param issure 签发者 @return string token @return error 错误
func StructToJson ¶
StructToJson
@Description: struct to json @param value @return string @return error
func StructToMap ¶
func StructToMap(value interface{}) map[string]interface{}
StructToMap
@Description: struct to map @param value @return map[string]interface{}
Types ¶
Click to show internal directories.
Click to hide internal directories.