Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddArticle ¶
@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 ¶
@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 ¶
@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 ¶
@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 ¶
@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 ¶
@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 ¶
@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 ¶
@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 ¶
@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.