Documentation ¶
Index ¶
- Variables
- type Result
- type UserClaims
- type UserHandler
- type UserHandlerV1
- func (uh *UserHandlerV1) Edit(ctx *gin.Context)
- func (uh *UserHandlerV1) LoginJWT(ctx *gin.Context)
- func (uh *UserHandlerV1) LoginSMS(ctx *gin.Context)
- func (uh *UserHandlerV1) Logout(ctx *gin.Context)
- func (uh *UserHandlerV1) Profile(ctx *gin.Context)
- func (uh *UserHandlerV1) RegisterRoutes(srv *gin.Engine)
- func (uh *UserHandlerV1) SendLoginSMSCode(ctx *gin.Context)
- func (uh *UserHandlerV1) SignUp(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var JWTKey = []byte("x12vN8JOO1C74P4DE4seqqgEeGPmWvuJ")
JWTKey 因为 JWT Key 不太可能变,所以可以直接写成常量 也可以考虑做成依赖注入
Functions ¶
This section is empty.
Types ¶
type UserClaims ¶
type UserHandler ¶
type UserHandler interface { RegisterRoutes(srv *gin.Engine) LoginSMS(ctx *gin.Context) SendLoginSMSCode(ctx *gin.Context) SignUp(ctx *gin.Context) LoginJWT(ctx *gin.Context) Profile(ctx *gin.Context) Edit(ctx *gin.Context) Logout(ctx *gin.Context) // contains filtered or unexported methods }
func NewUserHandler ¶
func NewUserHandler(svc service.UserService, codeSvc service.CodeService) UserHandler
NewUserHandler New UserHandler
type UserHandlerV1 ¶
type UserHandlerV1 struct {
// contains filtered or unexported fields
}
func (*UserHandlerV1) Edit ¶
func (uh *UserHandlerV1) Edit(ctx *gin.Context)
func (*UserHandlerV1) LoginJWT ¶
func (uh *UserHandlerV1) LoginJWT(ctx *gin.Context)
func (*UserHandlerV1) LoginSMS ¶
func (uh *UserHandlerV1) LoginSMS(ctx *gin.Context)
func (*UserHandlerV1) Logout ¶
func (uh *UserHandlerV1) Logout(ctx *gin.Context)
func (*UserHandlerV1) Profile ¶
func (uh *UserHandlerV1) Profile(ctx *gin.Context)
func (*UserHandlerV1) RegisterRoutes ¶
func (uh *UserHandlerV1) RegisterRoutes(srv *gin.Engine)
func (*UserHandlerV1) SendLoginSMSCode ¶
func (uh *UserHandlerV1) SendLoginSMSCode(ctx *gin.Context)
func (*UserHandlerV1) SignUp ¶
func (uh *UserHandlerV1) SignUp(ctx *gin.Context)
Click to show internal directories.
Click to hide internal directories.