Documentation
¶
Index ¶
Constants ¶
View Source
const ( Pid = "pid" // 用户的父id业务场景:子账号 IsAdmin = "isAdmin" // 是否是管理员 Role = "role" // 用户身份 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JsonWebToken ¶
type JsonWebToken string
JsonWebToken jwt
func NewToken ¶
func NewToken(name string, mid, pid, role int64, isAdmin bool) (jwt JsonWebToken, err error)
NewToken create new jwt token
func (JsonWebToken) String ¶
func (jwt JsonWebToken) String() string
Click to show internal directories.
Click to hide internal directories.