package
0.1.21
Repository: https://github.com/brave/go-sync.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

CreateDBSyncEntity converts a protobuf sync entity into a DB sync item.
CreatePBSyncEntity converts a DB sync item to a protobuf sync entity.
NewDatastoreWithPrometheus returns an instance of the Datastore decorated with prometheus summary metric.
NewDynamo returns a dynamoDB client to be used.
NewServerClientUniqueTagItem creates a tag item which is used to ensure the uniqueness of server-defined or client-defined unique tags for a client.
NewServerClientUniqueTagItemQuery creates a tag item query which is used to determine whether a sync entity has a unique tag item or not.

# Variables

Table is the name of the table in dynamoDB, could be modified in tests.

# Structs

ClientItemCount is used to marshal and unmarshal ClientItemCount items in dynamoDB.
DatastoreWithPrometheus implements Datastore interface with all methods wrapped with Prometheus metrics.
DisabledMarkerItem is used to mark sync chain as deleted in Dynamodb.
DisabledMarkerItemQuery is used to query for disabled marker item in DynamoDB.
Dynamo is a Datastore wrapper around a dynamoDB.
PrimaryKey struct is used to represent the primary key of our table.
ServerClientUniqueTagItem is used to marshal and unmarshal tag items in dynamoDB.
ServerClientUniqueTagItemQuery is used to query for unique tag items in dynamoDB.
SyncEntity is used to marshal and unmarshal sync items in dynamoDB.

# Interfaces

Datastore abstracts over the underlying datastore.

# Type aliases

ClientItemCountByClientID implements sort.Interface for []ClientItemCount based on ClientID.
SyncEntityByClientIDID implements sort.Interface for []SyncEntity based on the string concatenation of ClientID and ID fields.
SyncEntityByMtime implements sort.Interface for []SyncEntity based on Mtime.
TagItemByClientIDID implements sort.Interface for []ServerClientUniqueTagItem based on the string concatenation of ClientID and ID fields.