WIP Scaffholding

This commit is contained in:
2026-02-09 12:32:45 +08:00
parent 138825a074
commit 55101752f5
16 changed files with 73 additions and 0 deletions

25
core/interfaces.go Normal file
View File

@@ -0,0 +1,25 @@
package core
import (
"context"
"io"
)
type EntryStore interface {
Append(ctx context.Context, entry Entry) (EntryID, error)
Redact(ctx context.Context, entryID EntryID) error
Get(ctx context.Context, entryID EntryID) (Entry, error)
ScanForwards(ctx context.Context, entryID EntryID) ([]EntryID, error)
ScanBackwards(ctx context.Context, entryID EntryID) ([]EntryID, error)
Head(ctx context.Context, ledgerID LedgerID) (EntryID, error)
IsEmpty(ctx context.Context, ledgerID LedgerID) bool
}
type PayloadStore interface {
Put(ctx context.Context, reader io.Reader) (PayloadID, error)
Delete(ctx context.Context, payloadID PayloadID) error
}