Switched to a DAG ledger

This commit is contained in:
2026-02-16 07:36:44 +00:00
parent 4e830bf5d0
commit 78f22a8320
4 changed files with 277 additions and 84 deletions

View File

@@ -1,18 +1,24 @@
package core
import (
"context"
)
import "context"
type EntryStore interface {
Store(ctx context.Context, entry Entry) error
Load(ctx context.Context, id EntryID) (Entry, error)
Exists(ctx context.Context, id EntryID) (bool, error)
Delete(ctx context.Context, id EntryID) error
StoreBatch(ctx context.Context, entries []Entry) error
LoadBatch(ctx context.Context, ids []EntryID) ([]Entry, error)
}
type ReferenceStore interface {
Set(ctx context.Context, name string, entryID EntryID) error
Get(ctx context.Context, name string) (EntryID, bool, error)
Delete(ctx context.Context, name string) error
List(ctx context.Context, prefix string) (map[string]EntryID, error)
SetBatch(ctx context.Context, refs map[string]EntryID) error
GetBatch(ctx context.Context, names []string) (map[string]EntryID, error)
}