incrversion

package
v3.8.1-rc.7 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VersionSynchronizer

type VersionSynchronizer[V, R any] struct {
	Ctx                context.Context
	DB                 db_interface.VersionSyncModel
	TableName          string
	EntityID           string
	Key                func(V) string
	Local              func() ([]V, error)
	ServerVersion      func() R
	Server             func(version *model_struct.LocalVersionSync) (R, error)
	Full               func(resp R) bool
	Version            func(resp R) (string, uint64)
	Delete             func(resp R) []string
	Update             func(resp R) []V
	Insert             func(resp R) []V
	ExtraData          func(resp R) any
	ExtraDataProcessor func(ctx context.Context, data any) error
	Syncer             func(server, local []V) error
	FullSyncer         func(ctx context.Context) error
	FullID             func(ctx context.Context) ([]string, error)
	IDOrderChanged     func(resp R) bool
}

func (*VersionSynchronizer[V, R]) CheckVersionSync

func (o *VersionSynchronizer[V, R]) CheckVersionSync() error

func (*VersionSynchronizer[V, R]) Sync

func (o *VersionSynchronizer[V, R]) Sync() error

Jump to

Keyboard shortcuts

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