v1

package
v0.0.0-...-9db7971 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUser

func GetUser(c *gin.Context)

GetUser @Summary 获取用户资料 @Description 获取一个用户公开的详细资料 @Tags 用户模块 @Accept json @Produce json @Param x-token header string false "token" @Param id path int true "用户ID" @Success 200 {object} response.GetUserA "是否成功,返回信息,用户名" @Router /users/{id} [get]

func Login

func Login(c *gin.Context)

Login @Summary 用户登录 @Description 根据用户邮箱和密码等生成token,并将token返回给用户 @Tags 登录模块 @Accept json @Produce json @Param data body response.LoginQ true "用户名,密码" @Success 200 {object} response.LoginA "是否成功,返回信息,Token" @Router /login [post]

func Register

func Register(c *gin.Context)

Register @Summary 注册 @Description 注册新用户 @Tags 登录模块 @Accept json @Produce json @Param data body response.RegisterQ true "用户名,密码" @Success 200 {object} response.CommonA "是否成功,返回信息,Token" @Router /register [post]

func UploadFile

func UploadFile(c *gin.Context)

UploadFile @Summary 上传文件 @Description 上传一个文件测试 @Tags 其他模块 @Accept multipart/form-data @Produce json @Param file formData file true "文件" @Param name formData string true "name" @Success 200 {object} response.UploadFileA "是否成功,返回信息" @Router /resource/upload [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

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