event

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataGetByID added in v1.1.5

func DataGetByID(conndb *sql.DB, v IStructSql) *sql.Rows

按接口查询数据

func MarshalQsql added in v1.1.5

func MarshalQsql(v interface{}, tablename string) (sql string)

生成查询SQL

func MarshalUpSql added in v1.1.5

func MarshalUpSql(v interface{}, tablename string) (sql string)

生成更新SQL

Types

type ActorBase

type ActorBase struct {
	EventStepNum int //当前步骤
}

type IActor

type IActor interface {
	//当前要运行的步骤
	GetStepNum() int
	//运行步骤成功就进入下一步,失败就开始执行回滚,成功失败内部处理
	RunNext()
	//是否已完成
	IsEnd() bool
	//拿到要返回用的JSON对象,或不用这个直接推信息
	GetResult() JsonMap
}

IActor 消息盒子的借口

type IStructSql added in v1.1.5

type IStructSql interface {
	//表名
	GetTableName() string
	//保存参数列表
	ParmArray() []interface{}
	//查询的参数列表
	QueryArray() []interface{}
}

数据映射接口

type JsonArray

type JsonArray []interface{}

func (JsonArray) GetArray

func (js JsonArray) GetArray(index int) JsonArray

func (JsonArray) GetIntArray

func (js JsonArray) GetIntArray() []int

func (JsonArray) GetMap

func (js JsonArray) GetMap(index int) JsonMap

func (JsonArray) GetString added in v1.3.0

func (js JsonArray) GetString(index int) *util.String

type JsonMap

type JsonMap map[string]interface{}

func (JsonMap) GetArray

func (js JsonMap) GetArray(key string) JsonArray

返回一个JsonArray

func (JsonMap) GetIntArray

func (js JsonMap) GetIntArray(key string) []int

返回[]int

func (JsonMap) GetMap

func (js JsonMap) GetMap(key string) JsonMap

返回一个JsonMap

func (JsonMap) GetString added in v1.3.0

func (js JsonMap) GetString(key string) *util.String

type SqlDataStructModel added in v1.1.5

type SqlDataStructModel struct {
	KeyID       int           //用户主键
	DataKey     string        //数据表
	UpTime      time.Duration //保存时间
	DataDBModel IStructSql    //要保存的东西
}

数据映射接口的导入结构

func (*SqlDataStructModel) GetDataKey added in v1.1.5

func (this *SqlDataStructModel) GetDataKey() string

func (*SqlDataStructModel) GetKeyID added in v1.1.5

func (this *SqlDataStructModel) GetKeyID() int

func (*SqlDataStructModel) GetUpTime added in v1.1.5

func (this *SqlDataStructModel) GetUpTime() time.Duration

func (*SqlDataStructModel) UpDataSave added in v1.1.5

func (this *SqlDataStructModel) UpDataSave(conndb model.IConnDB) error

Jump to

Keyboard shortcuts

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