Documentation ¶
Index ¶
- Variables
- func GenerateAppToken(m *models.YshopUser, d time.Time) (string, error)
- func GenerateToken(m *models.SysUser, d time.Duration) (string, error)
- func GetAdminDetailUser(c *gin.Context) *models.SysUser
- func GetAdminUser(c *gin.Context) (*vo.JwtUser, error)
- func GetAdminUserId(c *gin.Context) (int64, error)
- func GetAppDetailUser(c *gin.Context) (*models.YshopUser, error)
- func GetAppUser(c *gin.Context) (*vo.JwtUser, error)
- func GetAppUserId(c *gin.Context) (int64, error)
- func RemoveAppUser(c *gin.Context) error
- func RemoveUser(c *gin.Context) error
- func Setup()
- func ValidateToken(tokenString string) (*vo.JwtUser, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAbsent = "token absent" // 令牌不存在 ErrInvalid = "token invalid" // 令牌无效 ErrExpired = "token expired" // 令牌过期 ErrOther = "other error" // 其他错误 )
Functions ¶
func GetAppDetailUser ¶
返回 detail user
func RemoveAppUser ¶
func RemoveUser ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.