Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthAPI ¶
type AuthAPI struct {
TokenResolver *token.Resolver
AuthHandler handler.AuthHandler
CaptchaHandler handler.CaptchaHandler
}
func (*AuthAPI) Captcha ¶
Captcha @Summary Captcha @Description send captcha code mail to specified email address @Tags auth @Accept json @Produce json @Param CaptchaOption body types.CaptchaOption true "CaptchaOption" @Success 200 {object} types.Response @Router /auth/captcha [POST]
func (*AuthAPI) Login ¶
Login @Summary Login @Description login with password, and returns jwt token pair @Tags auth @Accept json @Produce json @Param LoginOptions body types.LoginOptions true "LoginOptions" @Success 200 {object} types.Response{data=types.TokenResult} @Router /auth/login [POST]
func (*AuthAPI) Refresh ¶
Refresh @Summary Refresh @Description ask for refresh access TokenHandler lifetime with refresh TokenHandler @Tags auth @Accept json @Produce json @Param RefreshTokenOptions body types.RefreshTokenOptions true "refresh params" @Success 200 {object} types.Response{data=types.TokenResult} @Router /auth/refresh [POST]
func (*AuthAPI) Register ¶
Register @Summary Register @Description register a new user with verification code @Tags auth @Accept json @Produce json @Param RegisterOptions body types.RegisterOptions true "register params" @Success 200 {object} types.Response @Router /auth/register [POST]
func (*AuthAPI) ResetPassword ¶
ResetPassword @Summary ResetPassword @Description reset user password with verification code @Tags auth @Accept json @Produce json @Param ResetOptions body types.ResetOptions true "ResetOptions" @Success 200 {object} types.Response @Router /auth/reset [POST]
type HealthAPI ¶
type HealthAPI struct {
HealthHandler handler.HealthHandler
}
type UserAPI ¶
type UserAPI struct {
UserHandler handler.UserHandler
}
func (UserAPI) Info ¶
Info @Summary Info @Description get user information by given uid @Tags user @Accept json @Produce json @Param uid path string true "uid" @Success 200 {object} types.Response{data=types.UserInfo} @Router /user/:uid [GET]