Documentation ¶
Index ¶
- Variables
- func RecordUpdaterInfo(project, table, field, seperator string, embedded bool, sameFields ...string)
- type Callback
- type FileRelation
- func (f *FileRelation) Callback() Callback
- func (f *FileRelation) DBI() *factory.DBI
- func (f *FileRelation) Listen(events ...string) *FileRelation
- func (f *FileRelation) ListenDefault() *FileRelation
- func (f *FileRelation) On(event string, h factory.EventHandler) *FileRelation
- func (f *FileRelation) OnRead(event string, h factory.EventReadHandler) *FileRelation
- func (f *FileRelation) SetDBI(dbi *factory.DBI) *FileRelation
- func (f *FileRelation) SetEmbedded(embedded bool) *FileRelation
- func (f *FileRelation) SetSeperator(seperator string) *FileRelation
- func (f *FileRelation) SetTable(table string, field string, samesFields ...string) *FileRelation
- type Property
- func (pro *Property) Embedded() bool
- func (pro *Property) Exit() bool
- func (pro *Property) GenUpdater(m factory.Model, cond db.Compound) *Property
- func (pro *Property) Seperator() string
- func (pro *Property) SetEmbedded(on bool) *Property
- func (pro *Property) SetExit(exit bool) *Property
- func (pro *Property) SetSeperator(sep string) *Property
- func (pro *Property) SetUpdater(updater func(field string, content string) error) *Property
- func (pro *Property) Updater() func(field string, content string) error
- type UpdaterInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var DBI = func() *factory.DBI { return dbschema.DBI }
View Source
var UpdaterInfos = map[string]map[string]map[string]UpdaterInfo{ ``: { `nging_file`: { `view_url`: UpdaterInfo{}, }, `nging_file_thumb`: { `view_url`: UpdaterInfo{}, }, }, }
UpdaterInfos [Project][Table][Field]
Functions ¶
func RecordUpdaterInfo ¶
func RecordUpdaterInfo(project, table, field, seperator string, embedded bool, sameFields ...string)
RecordUpdaterInfo 记录
Types ¶
type FileRelation ¶
type FileRelation struct { TableName string // 数据表名称 FieldName string // 数据表字段名 SameFields []string // 数据表类似字段名 Embedded bool // 是否为嵌入图片 Seperator string // 文件字段中多个文件路径之间的分隔符,空字符串代表为单个文件 // contains filtered or unexported fields }
FileRelation 文件关联数据监听 FileRelation.SetTable(`table`,`field`).ListenDefault()
func (*FileRelation) Callback ¶
func (f *FileRelation) Callback() Callback
func (*FileRelation) DBI ¶
func (f *FileRelation) DBI() *factory.DBI
func (*FileRelation) Listen ¶
func (f *FileRelation) Listen(events ...string) *FileRelation
func (*FileRelation) ListenDefault ¶
func (f *FileRelation) ListenDefault() *FileRelation
func (*FileRelation) On ¶
func (f *FileRelation) On(event string, h factory.EventHandler) *FileRelation
func (*FileRelation) OnRead ¶
func (f *FileRelation) OnRead(event string, h factory.EventReadHandler) *FileRelation
func (*FileRelation) SetDBI ¶
func (f *FileRelation) SetDBI(dbi *factory.DBI) *FileRelation
func (*FileRelation) SetEmbedded ¶
func (f *FileRelation) SetEmbedded(embedded bool) *FileRelation
func (*FileRelation) SetSeperator ¶
func (f *FileRelation) SetSeperator(seperator string) *FileRelation
func (*FileRelation) SetTable ¶
func (f *FileRelation) SetTable(table string, field string, samesFields ...string) *FileRelation
type Property ¶
type Property struct {
// contains filtered or unexported fields
}
func NewProperty ¶
func NewProperty() *Property
func (*Property) GenUpdater ¶
func (*Property) SetEmbedded ¶
func (*Property) SetSeperator ¶
func (*Property) SetUpdater ¶
type UpdaterInfo ¶
Click to show internal directories.
Click to hide internal directories.