Documentation ¶
Index ¶
- Constants
- func AllNodes(search string, page, rows int) (e.List, error)
- func DefineNodes() error
- func DeleteNodeById(id string) (e.Item, error)
- func GetNodeById(id string) (e.Item, error)
- func InitMaster() error
- type Master
- func (c *Master) GetNodeByID(id string) *Node
- func (c *Master) GetSyncById(idT string) (e.Item, error)
- func (c *Master) LoadNode(params e.Json) error
- func (c *Master) LoadNodeById(id string) error
- func (c *Master) LoadNodes() error
- func (c *Master) SetSync(schema, table, action, node, idT string, data e.Json, query string) (int, error)
- func (c *Master) UnloadNodeById(id string) error
- type Node
- func (c *Node) DelSyncByIndex(index int) error
- func (c *Node) GetSyncByIdT(idT string) (e.Item, error)
- func (c *Node) InsertValues(data e.Json) (fields, values string)
- func (c *Node) LatIndex() int
- func (n *Node) Scan(data *e.Json) error
- func (c *Node) SqlField(schema, table string, data e.Json) string
- func (c *Node) SyncIdT(idT string) error
- func (c *Node) SyncMasterToNode() error
- func (c *Node) SyncNode() error
- func (c *Node) SyncNodeToMaster() error
- func (c *Node) SyncQuery(query string, index int) error
- func (c *Node) SyncRecord(schema, table, idT string, _data e.Json, action string, _index int) error
- func (c *Node) ToSql(schema, table, idT string, data e.Json, action string) (string, bool)
- func (c *Node) UpsertValues(data e.Json) (fields, values, fieldValue string)
Constants ¶
View Source
const NodeStatusActive = 1
View Source
const NodeStatusError = 4
View Source
const NodeStatusIdle = 0
View Source
const NodeStatusSync = 3
View Source
const NodeStatusWorking = 2
Variables ¶
This section is empty.
Functions ¶
func DefineNodes ¶ added in v0.0.34
func DefineNodes() error
func InitMaster ¶
func InitMaster() error
Types ¶
type Master ¶
func (*Master) GetNodeByID ¶
func (*Master) LoadNodeById ¶
func (*Master) UnloadNodeById ¶
type Node ¶
type Node struct { Db int URL string Date_make time.Time `json:"date_make"` Date_update time.Time `json:"date_update"` Id string `json:"_id"` Mode int `json:"mode"` Data e.Json `json:"_data"` Status int `json:"status"` Index int `json:"index"` Synced *core.Collection }
func (*Node) DelSyncByIndex ¶ added in v0.0.34
func (*Node) SyncMasterToNode ¶ added in v0.0.34
func (*Node) SyncNodeToMaster ¶ added in v0.0.34
func (*Node) SyncRecord ¶
Click to show internal directories.
Click to hide internal directories.