package
Version:
v0.0.0-...-269099d
Opens a new window with list of versions in this module.
Published: Oct 30, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
@Summary Login
@Tags User
@Description 登录
@accept json
@Produce json
@Param auth body Auth true "用户/密码"
@Success 200 {object} msg.Response
@Failure 200 {object} msg.Response
@Router /api/v1/user/login [post]
@Summary Logout
@Tags User
@Description 登出
@Produce json
@Security token
@Success 200 {object} msg.Response
@Failure 200 {object} msg.Response
@Router /api/v1/user/logout [get]
@Summary Reset Password
@Tags User
@Description 重置密码
@accept json
@Produce json
@Param resetpwd body ResetPwd true "旧/新密码"
@Success 200 {object} msg.Response
@Failure 200 {object} msg.Response
@Router /api/v1/self/resetpwd/ [post]
@Summary Self
@Tags User
@Description 获取个人信息
@Produce json
@Security token
@Success 200 {object} msg.Response
@Failure 200 {object} msg.Response
@Router /api/v1/user/info [get]
type Auth struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
}
type ResetPwd struct {
Password string `json:"password" binding:"required"`
NewPassword string `json:"newpassword" binding:"required"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.