Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptchaController ¶
type CaptchaController struct { }
func NewCaptchaController ¶
func NewCaptchaController() *CaptchaController
func (*CaptchaController) Get ¶
func (c *CaptchaController) Get(ctx *gin.Context) (res interface{}, err error)
@Summary 获取验证码 @Description 获取验证码 @Tags System @Produce json @param name query string false "名称" @Success 200 {object} app.CommResponse "成功" @Failure 400 {object} app.ErrResponse "请求错误" @Failure 500 {object} app.ErrResponse "内部错误" @Router /api/sys/captcha [get]
type LoginController ¶
type LoginController struct {
// contains filtered or unexported fields
}
func NewLoginController ¶
func NewLoginController(store store.Factory, logger log.Logger) *LoginController
func (*LoginController) Info ¶
func (c *LoginController) Info(ctx *gin.Context) (res interface{}, err error)
@Summary 用户信息 @Description 获取登录用户信息 @Tags Auth @Produce json @Accept json @Security JWT @param LoginRequest body LoginRequest true "用户信息" @Success 200 {object} app.CommResponse "成功" @Failure 400 {object} app.ErrResponse "请求错误" @Failure 500 {object} app.ErrResponse "内部错误" @Router /api/v1/user [get]
func (*LoginController) Login ¶
func (c *LoginController) Login(ctx *gin.Context) (res interface{}, err error)
@Summary 登录接口 @Description 用户登录生成Token @Tags System @Produce json @Accept json @param LoginRequest body LoginRequest true "用户信息" @Success 200 {object} app.CommResponse "成功" @Failure 400 {object} app.ErrResponse "请求错误" @Failure 500 {object} app.ErrResponse "内部错误" @Router /api/sys/login [post]
func (*LoginController) Logout ¶
func (c *LoginController) Logout(ctx *gin.Context) (res interface{}, err error)
@Summary 退出接口 @Description 用户退出清除cookie @Tags System @Produce json @Accept json @Success 200 {object} app.CommResponse "成功" @Failure 400 {object} app.ErrResponse "请求错误" @Failure 500 {object} app.ErrResponse "内部错误" @Router /api/sys/logout [post]
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token"`
}
type SystemController ¶
type SystemController struct {
// contains filtered or unexported fields
}
func NewSystemController ¶
func NewSystemController(store store.Factory, logger log.Logger) *SystemController
func (*SystemController) Get ¶
func (c *SystemController) Get(ctx *gin.Context) (res interface{}, err error)
@Summary 获取系统配置项 @Description 获取系统配置项,一般是key-value格式 @Tags System @Produce json @param name query string false "名称" @Success 200 {object} app.CommResponse "成功" @Failure 400 {object} app.ErrResponse "请求错误" @Failure 500 {object} app.ErrResponse "内部错误" @Router /api/sys/config [get]