v1

package
v0.0.0-...-413ceae Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddArticle

func AddArticle(c *gin.Context)

@Summary 新增文章 @Produce json @Param tag_id query int true "TagID" @Param title query string true "Title" @Param desc query string true "Desc" @Param content query string true "Content" @Param created_by query string true "CreatedBy" @Param state query int true "State" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Router /api/v1/articles [post]

func AddTag

func AddTag(c *gin.Context)

@Summary 新增文章标签 @Produce json @Param name query string true "Name" @Param state query int false "State" @Param created_by query int false "CreatedBy" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Router /api/v1/tags [post]

func DeleteArticle

func DeleteArticle(c *gin.Context)

@Summary 删除文章 @Produce json @Param id param int true "ID" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Failure 200 {string} json "{"code":400,"data":{},"msg":"请求参数错误"}" @Router /api/v1/articles/{id} [delete]

func DeleteTag

func DeleteTag(c *gin.Context)

@Summary 删除文章标签 @Produce json @Param id param int true "ID" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Router /api/v1/tags/{id} [delete]

func EditArticle

func EditArticle(c *gin.Context)

@Summary 修改文章 @Produce json @Param id param int true "ID" @Param tag_id query string false "TagID" @Param title query string false "Title" @Param desc query string false "Desc" @Param content query string false "Content" @Param modified_by query string true "ModifiedBy" @Param state query int false "State" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Failure 200 {string} json "{"code":400,"data":{},"msg":"请求参数错误"}" @Router /api/v1/articles/{id} [put]

func EditTag

func EditTag(c *gin.Context)

@Summary 修改文章标签 @Produce json @Param id param int true "ID" @Param name query string true "ID" @Param state query int false "State" @Param modified_by query string true "ModifiedBy" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Router /api/v1/tags/{id} [put]

func GetArticle

func GetArticle(c *gin.Context)

@Summary 获取单个文章 @Produce json @Param id param int true "ID" @Success 200 {string} json "{"code":200,"data":{"id":3,"created_on":1516937037,"modified_on":0,"tag_id":11,"tag":{"id":11,"created_on":1516851591,"modified_on":0,"name":"312321","created_by":"4555","modified_by":"","state":1},"content":"5555","created_by":"2412","modified_by":"","state":1},"msg":"ok"}" @Router /api/v1/articles/{id} [get]

func GetArticles

func GetArticles(c *gin.Context)

@Summary 获取多个文章 @Produce json @Param tag_id query int false "TagID" @Param state query int false "State" @Param created_by query int false "CreatedBy" @Success 200 {string} json "{"code":200,"data":[{"id":3,"created_on":1516937037,"modified_on":0,"tag_id":11,"tag":{"id":11,"created_on":1516851591,"modified_on":0,"name":"312321","created_by":"4555","modified_by":"","state":1},"content":"5555","created_by":"2412","modified_by":"","state":1}],"msg":"ok"}" @Router /api/v1/articles [get]

func GetTags

func GetTags(c *gin.Context)

@Summary 获取多个文章标签 @Produce json @Param name query string false "Name" @Param state query int false "State" @Success 200 {string} json "{"code":200,"data":{"lists":[{"id":3,"created_on":1516849721,"modified_on":0,"name":"3333","created_by":"4555","modified_by":"","state":0}],"total":29},"msg":"ok"}" @Router /api/v1/tags [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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