Documentation
¶
Index ¶
- type AuthController
- type CallbackReq
- type CallbackRes
- type CaptchaController
- type ChangePasswordReq
- type ChangePasswordRes
- type GenerateReq
- type GenerateRes
- type GetLoginUrlReq
- type GetLoginUrlRes
- type LoginReq
- type MeReq
- type MeRes
- type OauthController
- type RegisterReq
- type RegisterRes
- type UpdateReq
- type UpdateRes
- type UserController
- func (UserController) ChangePassword(ctx context.Context, req *ChangePasswordReq) (res *ChangePasswordRes, err error)
- func (UserController) Generate(ctx context.Context, req *GenerateReq) (*system.CaptchaRes, error)
- func (UserController) Me(ctx context.Context, req *MeReq) (res *MeRes, err error)
- func (UserController) Update(ctx context.Context, req *UpdateReq) (res *UpdateRes, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthController ¶
func (AuthController) Login ¶
func (AuthController) Login(ctx context.Context, req *LoginReq) (res *res.AccessTokenRes, err error)
func (AuthController) Register ¶
func (AuthController) Register(ctx context.Context, req *RegisterReq) (res *RegisterRes, err error)
type CallbackReq ¶
type CallbackRes ¶
type CaptchaController ¶
type ChangePasswordReq ¶
type ChangePasswordReq struct { g.Meta `path:"/changePassword" method:"post"` Password string `json:"password" example:"密码"` NewPassword string `json:"newPassword" example:"新密码"` }
ChangePasswordReq @Description:
type ChangePasswordRes ¶
type ChangePasswordRes struct { }
type GenerateReq ¶
type GenerateRes ¶
type GenerateRes struct { }
type GetLoginUrlReq ¶
type GetLoginUrlRes ¶
type GetLoginUrlRes struct {
Url string
}
type LoginReq ¶
type LoginReq struct { g.Meta `path:"/login" method:"post" auth:"false" ` Captcha string `json:"captcha" example:"验证码"` Username string `json:"username" example:"用户名"` Password string `json:"password" example:"密码"` CaptchaId string `json:"captchaId" example:"验证码id"` }
LoginReq -----------------------------------------------------
type OauthController ¶
func (*OauthController) Callback ¶
func (OauthController *OauthController) Callback(ctx context.Context, req *CallbackReq) (*CallbackRes, error)
func (*OauthController) GetLoginUrl ¶
func (OauthController *OauthController) GetLoginUrl(ctx context.Context, req *GetLoginUrlReq) (*GetLoginUrlRes, error)
type RegisterReq ¶
type RegisterReq struct { g.Meta `path:"/register" method:"post" auth:"false"` Avatar string `json:"avatar"` Username string `json:"username"` Password string `json:"password"` NickName string `json:"nickName"` }
RegisterReq -----------------------------------------------------
type RegisterRes ¶
type RegisterRes struct {
Id uint
}
type UpdateReq ¶
type UpdateReq struct { g.Meta `path:"/update" method:"post"` Avatar string `json:"avatar" example:"用户头像"` NickName string `json:"nickName" example:"用户昵称"` }
UpdateReq -----------------------------------------------------
type UserController ¶
func (UserController) ChangePassword ¶
func (UserController) ChangePassword(ctx context.Context, req *ChangePasswordReq) (res *ChangePasswordRes, err error)
ChangePassword @Description: @receiver UserController @param ctx @param req @return *response.Response
func (UserController) Generate ¶
func (UserController) Generate(ctx context.Context, req *GenerateReq) (*system.CaptchaRes, error)
Click to show internal directories.
Click to hide internal directories.