api

package
v0.0.0-...-3576a75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUser

func GetUser(c *gin.Context)

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

func UploadAvatar(c *gin.Context)

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

func UserDelete(c *gin.Context)

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

func UserLogin(c *gin.Context)

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

func UserRegister(c *gin.Context)

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

func UserSearch(c *gin.Context)

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

func UserUpdate(c *gin.Context)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL