Documentation ¶
Index ¶
- func CreateTable(dynamo *datastore.Dynamo) error
- func DeleteTable(dynamo *datastore.Dynamo) error
- func ResetTable(dynamo *datastore.Dynamo) error
- func ScanClientItemCounts(dynamo *datastore.Dynamo) ([]datastore.ClientItemCount, error)
- func ScanSyncEntities(dynamo *datastore.Dynamo) ([]datastore.SyncEntity, error)
- func ScanTagItems(dynamo *datastore.Dynamo) ([]datastore.ServerClientUniqueTagItem, error)
- type MockDatastore
- func (m *MockDatastore) ClearServerData(clientID string) ([]datastore.SyncEntity, error)
- func (m *MockDatastore) DisableSyncChain(clientID string) error
- func (m *MockDatastore) GetClientItemCount(clientID string) (int, error)
- func (m *MockDatastore) GetUpdatesForType(dataType int, clientToken int64, fetchFolders bool, clientID string, ...) (bool, []datastore.SyncEntity, error)
- func (m *MockDatastore) HasServerDefinedUniqueTag(clientID string, tag string) (bool, error)
- func (m *MockDatastore) InsertSyncEntitiesWithServerTags(entities []*datastore.SyncEntity) error
- func (m *MockDatastore) InsertSyncEntity(entity *datastore.SyncEntity) (bool, error)
- func (m *MockDatastore) IsSyncChainDisabled(clientID string) (bool, error)
- func (m *MockDatastore) UpdateClientItemCount(clientID string, count int) error
- func (m *MockDatastore) UpdateSyncEntity(entity *datastore.SyncEntity, oldVersion int64) (conflict bool, delete bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTable ¶
CreateTable creates datastore.Table in dynamoDB.
func DeleteTable ¶
DeleteTable deletes datastore.Table in dynamoDB.
func ResetTable ¶
ResetTable deletes and creates datastore.Table in dynamoDB.
func ScanClientItemCounts ¶
func ScanClientItemCounts(dynamo *datastore.Dynamo) ([]datastore.ClientItemCount, error)
ScanClientItemCounts scans the dynamoDB table and returns all client item counts.
func ScanSyncEntities ¶
func ScanSyncEntities(dynamo *datastore.Dynamo) ([]datastore.SyncEntity, error)
ScanSyncEntities scans the dynamoDB table and returns all sync items.
func ScanTagItems ¶
func ScanTagItems(dynamo *datastore.Dynamo) ([]datastore.ServerClientUniqueTagItem, error)
ScanTagItems scans the dynamoDB table and returns all tag items.
Types ¶
type MockDatastore ¶ added in v0.1.20
MockDatastore is used to mock datastorein tests
func (*MockDatastore) ClearServerData ¶ added in v0.1.20
func (m *MockDatastore) ClearServerData(clientID string) ([]datastore.SyncEntity, error)
ClearServerData mocks calls to ClearServerData
func (*MockDatastore) DisableSyncChain ¶ added in v0.1.20
func (m *MockDatastore) DisableSyncChain(clientID string) error
DisableSyncChain mocks calls to DisableSyncChain
func (*MockDatastore) GetClientItemCount ¶ added in v0.1.20
func (m *MockDatastore) GetClientItemCount(clientID string) (int, error)
GetClientItemCount mocks calls to GetClientItemCount
func (*MockDatastore) GetUpdatesForType ¶ added in v0.1.20
func (m *MockDatastore) GetUpdatesForType(dataType int, clientToken int64, fetchFolders bool, clientID string, maxSize int64) (bool, []datastore.SyncEntity, error)
GetUpdatesForType mocks calls to GetUpdatesForType
func (*MockDatastore) HasServerDefinedUniqueTag ¶ added in v0.1.20
func (m *MockDatastore) HasServerDefinedUniqueTag(clientID string, tag string) (bool, error)
HasServerDefinedUniqueTag mocks calls to HasServerDefinedUniqueTag
func (*MockDatastore) InsertSyncEntitiesWithServerTags ¶ added in v0.1.20
func (m *MockDatastore) InsertSyncEntitiesWithServerTags(entities []*datastore.SyncEntity) error
InsertSyncEntitiesWithServerTags mocks calls to InsertSyncEntitiesWithServerTags
func (*MockDatastore) InsertSyncEntity ¶ added in v0.1.20
func (m *MockDatastore) InsertSyncEntity(entity *datastore.SyncEntity) (bool, error)
InsertSyncEntity mocks calls to InsertSyncEntity
func (*MockDatastore) IsSyncChainDisabled ¶ added in v0.1.20
func (m *MockDatastore) IsSyncChainDisabled(clientID string) (bool, error)
IsSyncChainDisabled mocks calls to IsSyncChainDisabled
func (*MockDatastore) UpdateClientItemCount ¶ added in v0.1.20
func (m *MockDatastore) UpdateClientItemCount(clientID string, count int) error
UpdateClientItemCount mocks calls to UpdateClientItemCount
func (*MockDatastore) UpdateSyncEntity ¶ added in v0.1.20
func (m *MockDatastore) UpdateSyncEntity(entity *datastore.SyncEntity, oldVersion int64) (conflict bool, delete bool, err error)
UpdateSyncEntity mocks calls to UpdateSyncEntity