controller

package
v0.0.0-...-dae8c3a Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionCreate

type ActionCreate struct {
	Model        model.IModel                                     // model - 必须
	CreateBefore func(*gin.Context, *map[string]interface{}) bool // 默认处理函数
	CreateAfter  func(*gin.Context, interface{})                  // 默认处理函数
}

ActionCreate 创建

func (*ActionCreate) Create

func (ths *ActionCreate) Create(c *gin.Context)

Create 创建 - post

type ActionDelete

type ActionDelete struct {
	Model        model.IModel                    // model - 必须
	DeleteBefore func(*gin.Context) bool         // 默认处理函数
	DeleteAfter  func(*gin.Context, interface{}) // 默认处理函数
}

Delete 删除

func (*ActionDelete) Delete

func (ths *ActionDelete) Delete(c *gin.Context)

Delete 删除 - delete

type ActionDetail

type ActionDetail struct {
	Model       model.IModel                    // model - 必须
	DetailAfter func(*gin.Context, interface{}) // 默认处理函数
}

func (*ActionDetail) Detail

func (ths *ActionDetail) Detail(c *gin.Context)

Detail 详情 - get

type ActionList

type ActionList struct {
	Model      model.IModel                                // model - 必须
	QueryCond  map[string]interface{}                      // 查询条件
	ProcessRow func(*gin.Context, interface{})             // 默认处理函数
	OrderBy    func(*gin.Context) string                   // 获取排序
	ListAfter  func(*gin.Context, *map[string]interface{}) // 默认处理函数 - 用于判断或者追加数据
}

ActionList 数据列表

func (*ActionList) List

func (ths *ActionList) List(c *gin.Context)

List 记录列表 - get

type ActionUpdate

type ActionUpdate struct {
	Model model.IModel
}

ActionUpdate 更新

func (*ActionUpdate) Update

func (ths *ActionUpdate) Update(c *gin.Context)

Update 更新 - put

Jump to

Keyboard shortcuts

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