Versions in this module Expand all Collapse all v0 v0.2.0 Aug 23, 2026 Changes in this version + func DecodeResult(decision KeyedDecision, destination any) error + func Reject(code string) error + func RejectWithResult(code string, result any) error + func ScanDataset[T any](ctx context.Context, dataset *Dataset, ...) error + type Bucket struct + func (bucket *Bucket) Dataset(ctx context.Context, name string, options DatasetOptions) (*Dataset, error) + func (bucket *Bucket) ListDatasets(ctx context.Context) ([]DatasetInfo, error) + type BucketInfo struct + Name string + type Catalog struct + Buckets []BucketInfo + Database DatabaseInfo + Datasets []DatasetInfo + type Database struct + func OpenCatalog(ctx context.Context, path string, options KeyedOptions) (*Database, error) + func (db *Database) Bucket(ctx context.Context, name string) (*Bucket, error) + func (db *Database) Catalog(ctx context.Context) (Catalog, error) + func (db *Database) Close() error + func (db *Database) DatabaseID() string + func (db *Database) ListBuckets(ctx context.Context) ([]BucketInfo, error) + func (db *Database) Mutate(ctx context.Context, command KeyedCommand, mutation Mutation) (KeyedDecision, error) + func (db *Database) Snapshot(ctx context.Context) error + type DatabaseInfo struct + ID string + type Dataset struct + func (dataset *Dataset) Get(ctx context.Context, key string, destination any) (bool, error) + func (dataset *Dataset) Info() DatasetInfo + func (dataset *Dataset) Scan(ctx context.Context, visit func(DatasetRecord) (ScanAction, error)) error + type DatasetBounds struct + MaxRecords int + MaxValueBytes int + type DatasetInfo struct + Bounds DatasetBounds + BucketName string + ID uint64 + Kind DatasetKind + Name string + Origin DatasetOrigin + TypeIdentity string + type DatasetKind string + const KeyedJSON + type DatasetOptions struct + Kind DatasetKind + MaxRecords int + MaxValueBytes int + TypeIdentity string + func DefaultDatasetOptions() DatasetOptions + type DatasetOrigin string + const GoCatalog + type DatasetRecord struct + JSON json.RawMessage + Key string + func (record DatasetRecord) Decode(destination any) error + type KeyedCommand struct + ID string + type KeyedDB struct + func OpenKeyed(ctx context.Context, path string, options KeyedOptions) (*KeyedDB, error) + func (db *KeyedDB) Close() error + func (db *KeyedDB) GetKeyed(ctx context.Context, key string, destination any) (bool, error) + func (db *KeyedDB) SnapshotKeyed(ctx context.Context) error + func (db *KeyedDB) SubmitKeyed(ctx context.Context, command KeyedCommand, mutation KeyedMutation) (KeyedDecision, error) + type KeyedDecision struct + Applied bool + Code string + CommandID string + Duplicate bool + Result json.RawMessage + Sequence uint64 + type KeyedMutation func(*KeyedTx) (any, error) + type KeyedOptions struct + DedupeHorizon int + MaxRecords int + MaxTransactionBytes int + MaxValueBytes int + func DefaultKeyedOptions() KeyedOptions + type KeyedRejection struct + Code string + func (r *KeyedRejection) Error() string + type KeyedTx struct + func (tx *KeyedTx) Delete(key string) error + func (tx *KeyedTx) Get(key string, destination any) (bool, error) + func (tx *KeyedTx) Put(key string, value any) error + type Mutation func(*Tx) (any, error) + type ScanAction uint8 + const ScanContinue + const ScanStop + type Tx struct + func (tx *Tx) Delete(dataset *Dataset, key string) error + func (tx *Tx) Get(dataset *Dataset, key string, destination any) (bool, error) + func (tx *Tx) Put(dataset *Dataset, key string, value any) error v0.1.0 Aug 23, 2026 Changes in this version + const FormatVersion + type Account struct + Balance int64 + Frozen bool + ID uint64 + Version uint64 + type Command struct + AccountID uint64 + Amount int64 + ID string + Kind CommandKind + OtherAccountID uint64 + type CommandKind uint8 + const BeginTransfer + const Cancel + const Confirm + const Create + const Deposit + const Freeze + const Transfer + const Unfreeze + const Withdraw + type DB struct + func Open(ctx context.Context, options Options) (*DB, error) + func (db *DB) Close() error + func (db *DB) Get(id uint64) (Account, bool) + func (db *DB) Snapshot(ctx context.Context) error + func (db *DB) Stats() Stats + func (db *DB) Submit(ctx context.Context, command Command) (Result, error) + func (db *DB) SubmitBatch(ctx context.Context, commands []Command) ([]Result, error) + type Error struct + Kind ErrorKind + Op string + func (e *Error) Error() string + func (e *Error) Unwrap() error + type ErrorKind string + const ErrorCapacity + const ErrorClosed + const ErrorCorruption + const ErrorIncompatible + const ErrorInvalidInput + const ErrorPoisoned + const ErrorStorage + type Options struct + BatchMax int + DedupeHorizon int + MaxAccounts int + Path string + type Reason string + const ReasonAccountExists + const ReasonAccountFrozen + const ReasonAccountMissing + const ReasonApplied + const ReasonAwaitingConfirmation + const ReasonCancelled + const ReasonInsufficientFunds + const ReasonInvalidAmount + const ReasonInvalidWorkflow + type Result struct + Accepted bool + CommandID string + Duplicate bool + Reason Reason + Sequence uint64 + type Stats struct + AccountCount int + CommittedSequence uint64 + DedupeEntries int + SnapshotSequence uint64 + WALBytesWritten uint64