listener

package
v2.0.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBI = func() *factory.DBI {
	return dbschema.DBI
}

Functions

This section is empty.

Types

type Callback

type Callback func(m factory.Model) (tableID string, content string, property *Property)

type FileRelation

type FileRelation struct {
	TableName string // 数据表名称
	FieldName string // 数据表字段名
	Embedded  bool   // 是否为嵌入图片
	Seperator string // 文件字段中多个文件路径之间的分隔符,空字符串代表为单个文件
	// contains filtered or unexported fields
}

FileRelation 文件关联数据监听 FileRelation.SetTable(`table`,`field`).ListenDefault()

func New

func New(cb Callback, embedded bool, seperators ...string) *FileRelation

New 实例化监听器具

func (*FileRelation) Callback

func (f *FileRelation) Callback() Callback

func (*FileRelation) Listen

func (f *FileRelation) Listen(events ...string)

func (*FileRelation) ListenDefault

func (f *FileRelation) ListenDefault()

func (*FileRelation) SetDBI

func (f *FileRelation) SetDBI(dbi *factory.DBI) *FileRelation

func (*FileRelation) SetEmedded

func (f *FileRelation) SetEmedded(embedded bool) *FileRelation

func (*FileRelation) SetSeperator

func (f *FileRelation) SetSeperator(seperator string) *FileRelation

func (*FileRelation) SetTable

func (f *FileRelation) SetTable(table string, field string) *FileRelation

type Property

type Property struct {
	Embedded  bool   // 是否为嵌入图片
	Seperator string // 文件字段中多个文件路径之间的分隔符,空字符串代表为单个文件
	Exit      bool
}

Jump to

Keyboard shortcuts

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