api

package
v0.0.0-...-fa384c1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(c *gin.Context)

@Summary 增加用户 @Tags users @Accept json @Produce json @Param body body models.User true "body" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users [POST]

func Auth

func Auth(c *gin.Context)

@Summary 获取登录token 信息 @Tags auth @Accept json @Produce json @Param body body models.AuthSwag true "body" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /auth [POST]

func DeleteUser

func DeleteUser(c *gin.Context)

@Summary 删除用户 @Tags users @Accept json @Produce json @Param id path int true "id" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Router /api/v1/users/:id [DELETE]

func EditUser

func EditUser(c *gin.Context)

@Summary 更新用户 @Tags users @Accept json @Produce json @Param body body models.User true "body" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users/:id [PUT]

func GetUser

func GetUser(c *gin.Context)

@Summary 获取单个用户信息 @Tags users @Accept json @Produce json @Param id path int true "id" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users/:id [GET]

func GetUsers

func GetUsers(c *gin.Context)

@Summary 获取所有用户 @Tags users @Accept json @Produce json @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users [GET]

func Token

func Token(c *gin.Context)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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