Documentation ¶
Index ¶
- func RegisterRoutes() *gin.Engine
- type Result
- type UserClaims
- type UserHandler
- func (u *UserHandler) Edit(ctx *gin.Context)
- func (u *UserHandler) Login(ctx *gin.Context)
- func (u *UserHandler) LoginJWT(ctx *gin.Context)
- func (u *UserHandler) LoginSMS(ctx *gin.Context)
- func (u *UserHandler) Logout(ctx *gin.Context)
- func (u *UserHandler) Profile(ctx *gin.Context)
- func (u *UserHandler) ProfileJWT(ctx *gin.Context)
- func (u *UserHandler) RegisterRoutes(server *gin.Engine)
- func (u *UserHandler) RegisterRoutesV1(ug *gin.RouterGroup)
- func (u *UserHandler) SendLoginSMSCode(ctx *gin.Context)
- func (u *UserHandler) SignUp(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
Types ¶
type UserClaims ¶
type UserClaims struct { jwt.RegisteredClaims // 声明你自己的要放进去 token 里面的数据 Uid int64 // 自己随便加 UserAgent string }
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
UserHandler 我准备在它上面定义跟用户有关的路由
func NewUserHandler ¶
func NewUserHandler(svc service.UserService, codeSvc service.CodeService) *UserHandler
func (*UserHandler) Edit ¶
func (u *UserHandler) Edit(ctx *gin.Context)
func (*UserHandler) Login ¶
func (u *UserHandler) Login(ctx *gin.Context)
func (*UserHandler) LoginJWT ¶
func (u *UserHandler) LoginJWT(ctx *gin.Context)
func (*UserHandler) LoginSMS ¶
func (u *UserHandler) LoginSMS(ctx *gin.Context)
func (*UserHandler) Logout ¶
func (u *UserHandler) Logout(ctx *gin.Context)
func (*UserHandler) Profile ¶
func (u *UserHandler) Profile(ctx *gin.Context)
func (*UserHandler) ProfileJWT ¶
func (u *UserHandler) ProfileJWT(ctx *gin.Context)
func (*UserHandler) RegisterRoutes ¶
func (u *UserHandler) RegisterRoutes(server *gin.Engine)
func (*UserHandler) RegisterRoutesV1 ¶
func (u *UserHandler) RegisterRoutesV1(ug *gin.RouterGroup)
func (*UserHandler) SendLoginSMSCode ¶
func (u *UserHandler) SendLoginSMSCode(ctx *gin.Context)
func (*UserHandler) SignUp ¶
func (u *UserHandler) SignUp(ctx *gin.Context)
Click to show internal directories.
Click to hide internal directories.