Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUser ¶
GetUser @Tags user @Summary 获取用户信息 @Security ApiKeyAuth @accept application/json @Produce application/json @Success 200 {object} response.Response{data=model.User,msg=string} "返回用户信息" @Router /api/user/get [get]
func UploadAvatar ¶
UploadAvatar @Tags user @Summary 更新用户头像 @Security ApiKeyAuth @accept multipart/form-data @Produce application/json @Param file formData file true "上传文件" @Success 200 {object} response.Response{msg=string} "上传用户头像" @Router /api/user/avatar [post]
func UserDelete ¶
UserDelete @Tags user @Summary 删除用户(管理员) @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body request.UserDelete true "ID" @Success 200 {object} response.Response{msg=string} "删除用户" @Router /api/user/delete [post]
func UserLogin ¶
UserLogin @Tags user @Summary 用户登录 @accept application/json @Produce application/json @Param data body request.UserLogin true "账号,密码" @Success 200 {object} response.Response{data=response.UserLoginResponse,msg=string} "返回用户信息,token,过期时间" @Router /api/user/login [post]
func UserRegister ¶
UserRegister @Tags user @Summary 用户注册 @accept application/json @Produce application/json @Param data body request.UserRegister true "账号,密码,确认密码" @Success 200 {object} response.Response{data=model.User,msg=string} "返回用户信息" @Router /api/user/register [post]
func UserSearch ¶
UserSearch @Tags user @Summary 分页搜索用户 @accept application/json @Produce application/json @Param data body request.UserSearch true "页号,页大小,排序规则,排序字段,搜索词" @Success 200 {object} response.Response{data=response.PageResponse,msg=string} "总数,每页的记录数,总页数,数据,页号" @Router /api/user/search [post]
func UserUpdate ¶
UserUpdate @Tags user @Summary 更新用户信息 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body request.UserUpdate true "ID,用户名,头像地址,邮箱,电话,简介,性别" @Success 200 {object} response.Response{data=map[string]interface{},msg=string} "设置用户信息" @Router /api/user/update [post]
Types ¶
This section is empty.