syncer

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataModTypeInsert  = "insert"
	DataModTypeUpdate  = "update"
	DataModTypeDelete  = "delete"
	DataModTypeComment = "comment"

	DataModTypeSheetInsert = "sheet_insert"
	DataModTypeSheetUpdate = "sheet_update"
	DataModTypeSheetDelete = "sheet_delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSheetMod

type DataSheetMod struct {
	Group   string  `json:"group,omitempty"`
	SheetId int64   `json:"sheet_id,omitempty"`
	Rows    []int64 `json:"rows,omitempty"`
	ModType string  `json:"mod_type,omitempty"`
	Data    any     `json:"data,omitempty"`
}

type DataSyncer

type DataSyncer struct {
	// contains filtered or unexported fields
}

func NewData

func NewData(sockd sockdx.SockdCore) *DataSyncer

func (*DataSyncer) PushDeleteRow

func (s *DataSyncer) PushDeleteRow(source, tenantId, groupId, table string, ids []int64) error

func (*DataSyncer) PushNewRow

func (s *DataSyncer) PushNewRow(source, tenantId, groupId, table string, ids []int64, data any) error

func (*DataSyncer) PushSheetDeleteRow

func (s *DataSyncer) PushSheetDeleteRow(source, tenantId, groupId string, sheetId int64, ids []int64) error

func (*DataSyncer) PushSheetNewRow

func (s *DataSyncer) PushSheetNewRow(source, tenantId, groupId string, sheetId int64, ids []int64, data any) error

func (*DataSyncer) PushSheetUpdateRow

func (s *DataSyncer) PushSheetUpdateRow(source, tenantId, groupId string, sheetId int64, ids []int64, data any) error

func (*DataSyncer) PushUpdateRow

func (s *DataSyncer) PushUpdateRow(source, tenantId, groupId, table string, ids []int64, data any) error

type DataTableMod

type DataTableMod struct {
	Group   string  `json:"group,omitempty"`
	Table   string  `json:"table,omitempty"`
	Rows    []int64 `json:"rows,omitempty"`
	ModType string  `json:"mod_type,omitempty"`
	Data    any     `json:"data,omitempty"`
}

type UserSyncer

type UserSyncer struct {
	// contains filtered or unexported fields
}

func NewUser

func NewUser(sockd sockdx.SockdCore) *UserSyncer

func (*UserSyncer) NotifyMessageDelete

func (s *UserSyncer) NotifyMessageDelete(tenantId, user string, msgIds []int) error

func (*UserSyncer) NotifyMessageRead

func (s *UserSyncer) NotifyMessageRead(tenantId, user string, msgIds []int) error

func (*UserSyncer) NotifyUser

func (s *UserSyncer) NotifyUser(msg *entities.UserMessage) error

Jump to

Keyboard shortcuts

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