api

package
v0.0.0-...-928417b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(c *gin.Context)

func GetArticle

func GetArticle(c *gin.Context)

@Summary Get article @Produce json @Param id param int true "id" @Success 200 {string} json "{"code":200,"data":{"id":1,"name":""}]" @Router /api/articles/{id} [get]

func GetArticleList

func GetArticleList(c *gin.Context)

@Summary Get Article List @Produce json @Param page_num param int true "page_num" @Param page_size param int true "page_size" @Success 200 {string} json "{"code":200,"data":[{"id":1,"title":"abc"}]}" @Router /api/articles/list [get]

func Login

func Login(c *gin.Context)

func Logout

func Logout(c *gin.Context)

func SaveArticle

func SaveArticle(c *gin.Context)

func UploadImage

func UploadImage(c *gin.Context)

func UserAdd

func UserAdd(c *gin.Context)

@Summary Add User @Produce json @Param username param string true "username" @Param email param string true "email" @Param password param string true "password" @Success 200 {string} json "{"code":200,"data":1}" @Router /api/user/add [post]

func UserDelete

func UserDelete(c *gin.Context)

@Summary Delete User @Produce json @Param uid param int true "uid" @Success 200 {string} json "{"code":200, "msg": "操作成功", "data":""}" @Router /api/user/delete [post]

func Users

func Users(c *gin.Context)

@Summary Get User List @Produce json @Param username param string false "username" @Param email param string false "email" @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"Mantis", "email":"tangchunlinit@gmail.com"}]" @Router /api/user/list [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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