Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChekAuthAndGetUserInfoForControllers ¶
func ChekAuthAndGetUserInfoForControllers(tokenString string) (*ResultData, *TokenUserInfo, error)
Types ¶
type ResultData ¶
type ResultData struct { ResultCode int `json:"resultCode"` ResultMsg string `json:"resultMsg"` Data interface{} `json:"data"` }
func CreateResult ¶
func CreateResult(data interface{}, code int, msg interface{}) *ResultData
type TokenUserInfo ¶
type TokenUserInfo struct { UserId int `json:userId` UserUserName string `json:userUserName` UserType int `json:userType` //1普通 2管理员 jwt.StandardClaims }
func ParseJwtTokenUserInfo ¶
func ParseJwtTokenUserInfo(tokenString string) (*TokenUserInfo, error)
Click to show internal directories.
Click to hide internal directories.