Versions in this module Expand all Collapse all v0 v0.1.0 Apr 11, 2024 Changes in this version + const AppendIDAssignmentRand53 + const AppendIDAssignmentSequence + const AppendIDAssignmentUUID + const PathDelim + const TypeIDDelim + type AllowStale bool + type AppendBatchRequest struct + AppendRequests []*AppendRequest + Atomic IsAtomic + ParentPath string + type AppendBatchResponse struct + Error error + RawItem *RawItem + type AppendIDAssignment int + func NewAppendIDAssignment(s string) AppendIDAssignment + type AppendRequest struct + Data any + IDAssignment AppendIDAssignment + ItemType string + type Changed struct + Item *RawItem + func (r *Changed) IsSyncResponse() + type Client interface + Append func(ctx context.Context, parentPath, itemType string, ...) (*RawItem, error) + AppendBatch func(ctx context.Context, request AppendBatchRequest) ([]*AppendBatchResponse, error) + BeginList func(ctx context.Context, keyPath string, opts ...ListOptions) (ListResponse[*RawItem], error) + ContinueList func(ctx context.Context, token []byte) (ListResponse[*RawItem], error) + Delete func(ctx context.Context, itemPath string) error + DeleteBatch func(ctx context.Context, request DeleteRequest) ([]*DeleteResponse, error) + Get func(ctx context.Context, itemPath string, options ...GetOptions) (*RawItem, error) + GetBatch func(ctx context.Context, request GetRequest) ([]*RawItem, error) + NewTransaction func(ctx context.Context, handler TransactionHandler) (*TransactionResults, error) + Put func(ctx context.Context, path string, value any) (*RawItem, error) + PutBatch func(ctx context.Context, request PutBatchRequest) ([]*PutBatchResponse, error) + SyncList func(ctx context.Context, token []byte) (ListResponse[SyncResponse], error) + func NewClient(appCtx context.Context, storeID client.StoreID, options ...*client.Options) (Client, error) + type ContinueOptions struct + SortDirection SortDirection + type DeleteRequest struct + Atomic IsAtomic + ItemPaths []string + func NewDeleteRequest(itemPaths ...string) DeleteRequest + type DeleteResponse struct + Error error + KeyPath string + type Deleted struct + KeyPath string + func (r *Deleted) IsSyncResponse() + type GetOptions struct + AllowStale AllowStale + type GetRequest struct + AllowStale AllowStale + Atomic IsAtomic + ItemPaths []string + func NewGetRequest(itemPaths ...string) GetRequest + type IsAtomic bool + type Item struct + Data T + func UnmarshalItemList[T any](itemType string, rawItems ...*RawItem) ([]*Item[T], error) + func UnmarshalItem[T any](itemType string, rawItem *RawItem) (*Item[T], error) + type ItemKey []*ItemKeyComponent + func (k ItemKey) KeyPath() string + type ItemKeyComponent struct + ItemID KeyValue + ItemType string + func (c ItemKeyComponent) String() string + type ItemMetadata struct + CreatedAt time.Time + CreatedAtVersion uint64 + LastModifiedAt time.Time + LastModifiedAtVersion uint64 + type KeyValue interface + type KeyValueBinary struct + Value []byte + func (kv *KeyValueBinary) String() string + type KeyValueInt struct + Value int64 + func (kv *KeyValueInt) String() string + type KeyValueString struct + Value string + func (kv *KeyValueString) String() string + type KeyValueUint struct + Value uint64 + func (kv *KeyValueUint) String() string + type ListOptions struct + AllowStale AllowStale + Limit uint32 + SortDirection SortDirection + SortableProperty SortableProperty + func (lo *ListOptions) Merge(other *ListOptions) *ListOptions + type ListRequest struct + KeyPathPrefix string + type ListResponse interface + Next func() bool + Token func() (*ListToken, error) + Value func() T + type ListToken struct + CanContinue bool + CanSync bool + Data []byte + type PutBatchRequest struct + Atomic IsAtomic + PutData []*PutData + func NewPutBatchRequest[T any](putRequests ...*PutData) PutBatchRequest + type PutBatchResponse struct + Error error + type PutData struct + Data any + KeyPath string + type RawItem struct + ID KeyValue + ItemType string + JSONData json.RawMessage + Key ItemKey + Metadata ItemMetadata + ParentKeyPath ItemKey + func (i *RawItem) KeyPath() string + type Reset struct + func (r *Reset) IsSyncResponse() + type SortDirection int + const Backward + const Forward + type SortableProperty int + const SortByKeyPath + const SortByLastModifiedVersion + type SyncResponse interface + IsSyncResponse func() + type Transaction interface + Append func(prefix, itemType string, data any, idAssignment AppendIDAssignment) (string, error) + AppendBatch func(prefix string, items ...*AppendRequest) ([]string, error) + BeginList func(prefix string, options ...*ListOptions) (ListResponse[*RawItem], error) + ContinueList func(token *ListToken) (ListResponse[*RawItem], error) + Delete func(items ...string) error + Get func(item string) (*RawItem, error) + GetBatch func(items ...string) ([]*RawItem, error) + Put func(keyPath string, data any) error + PutBatch func(items ...*PutData) error + type TransactionHandler func(Transaction) error + type TransactionResults struct + AppendResponse []*AppendBatchResponse + Committed bool + DeleteResponse []*DeleteResponse + PutResponse []*PutBatchResponse + type UpdateOutsideOfWindow struct + KeyPath string + func (r *UpdateOutsideOfWindow) IsSyncResponse()