listener

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: AGPL-3.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GenUpdater 生成Updater
	GenUpdater      = fileupdater.GenUpdater
	NewProperty     = fileupdater.NewProperty
	NewPropertyWith = fileupdater.NewPropertyWith
	ThumbValue      = fileupdater.ThumbValue
	FieldValueWith  = fileupdater.FieldValueWith
)
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{},
		},
		`nging_file_moved`: {
			`from`: UpdaterInfo{},
			`to`:   UpdaterInfo{},
		},
	},
}

UpdaterInfos [Project][Table][Field]

Functions

func RecordUpdaterInfo

func RecordUpdaterInfo(project, table, field, seperator string, embedded bool, sameFields ...string)

RecordUpdaterInfo 记录

Types

type Callback

type Callback = fileupdater.CallbackFunc

type CallbackWithEvent added in v5.2.5

type CallbackWithEvent = fileupdater.CallbackFuncWithEvent

type FieldValue

type FieldValue = fileupdater.FieldValue

type FileRelation

type FileRelation struct {
	*fileupdater.Options
	// contains filtered or unexported fields
}

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

func New

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

New 实例化监听器具

func NewWithEvent added in v5.2.5

func NewWithEvent(cb fileupdater.CallbackFuncWithEvent, embedded bool, seperators ...string) *FileRelation

func NewWithOptions

func NewWithOptions(options *fileupdater.Options) *FileRelation

NewWithOptions 实例化监听器具

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 (*FileRelation) OnRead

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 = fileupdater.Property

Property 附加属性

type UpdaterInfo

type UpdaterInfo struct {
	Seperator string
	Embedded  bool
}

type ValueFunc

type ValueFunc = fileupdater.ValueFunc

Jump to

Keyboard shortcuts

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