api

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	CategoryService *service.Category
}

Category 分类管理

func NewCategory

func NewCategory() *Category

NewCategory 分类实例

func (*Category) Create

func (d *Category) Create(c *gin.Context)

Create 创建数据 @Tags 分类 @Security Bearer @Summary 添加分类数据 @Param body body model.Category true "分类数据" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/syscategory [post]

func (*Category) Delete

func (d *Category) Delete(c *gin.Context)

Delete 删除数据 @Tags 分类 @Security Bearer @Summary 删除分类数据 @Param id path string true "id" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/syscategory/{id} [delete]

func (*Category) Get

func (d *Category) Get(c *gin.Context)

Get 查询指定数据 @Tags 分类 @Security Bearer @Summary 通过ID获取分类数据 @Param id path int true "分类ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/syscategory/{id} [get]

func (*Category) Query

func (d *Category) Query(c *gin.Context)

Query 查询数据 @Tags 分类 @Security Bearer @Summary 分类列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param status query string false "status" @Param name query string false "name" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/syscategoryList [get]

func (*Category) Update

func (d *Category) Update(c *gin.Context)

Update 更新数据 @Tags 分类 @Security Bearer @Summary 更新分类数据 @Param body body model.Category true "分类数据" @Success 200 string string "{code: 200, msg: 更新成功}" @Failure 200 string string "{code: -1, msg: 更新失败}" @Router /api/v1/syscategory [put]

type Content

type Content struct {
	ContentService *service.Content
}

Content 分类管理

func NewContent

func NewContent() *Content

NewContent 分类实例

func (*Content) Create

func (d *Content) Create(c *gin.Context)

Create 创建数据 @Tags 内容管理 @Security Bearer @Summary 添加内容数据 @Param body body model.Content true "内容数据" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/syscontent [post]

func (*Content) Delete

func (d *Content) Delete(c *gin.Context)

Delete 删除数据 @Tags 内容管理 @Security Bearer @Summary 删除内容数据 @Param id path string true "id" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/syscontent/{id} [delete]

func (*Content) Get

func (d *Content) Get(c *gin.Context)

Get 查询指定数据 @Tags 内容管理 @Security Bearer @Summary 通过ID获取内容数据 @Param id path int true "内容ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/syscontent/{id} [get]

func (*Content) Query

func (d *Content) Query(c *gin.Context)

Query 查询数据 @Tags 内容管理 @Security Bearer @Summary 分类列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param status query string false "status" @Param name query string false "name" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/syscontentList [get]

func (*Content) Update

func (d *Content) Update(c *gin.Context)

Update 更新数据 @Tags 内容管理 @Security Bearer @Summary 更新内容数据 @Param body body model.Content true "内容数据" @Success 200 string string "{code: 200, msg: 更新成功}" @Failure 200 string string "{code: -1, msg: 更新失败}" @Router /api/v1/syscontent [put]

Jump to

Keyboard shortcuts

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