WIP Removing payloadStore
This commit is contained in:
@@ -5,24 +5,13 @@ import (
|
||||
)
|
||||
|
||||
type EntryStore interface {
|
||||
Append(ctx context.Context, entry Entry) error
|
||||
Get(ctx context.Context, entryID EntryID) (Entry, error)
|
||||
GetBySeq(ctx context.Context, ledgerID LedgerID, seq uint64) (Entry, error)
|
||||
Delete(ctx context.Context, entryID EntryID) error
|
||||
|
||||
Head(ctx context.Context, ledgerID LedgerID) (EntryID, error)
|
||||
HeadSeq(context.Context, LedgerID) (uint64, error)
|
||||
Tail(ctx context.Context, ledgerID LedgerID) (EntryID, error)
|
||||
Iterator(ctx context.Context, ledgerLedgerID, startSeq uint64) (EntryIterator, error)
|
||||
Put(ctx context.Context, id EntryID, canonical []byte) error
|
||||
Get(ctx context.Context, id EntryID) ([]byte, error)
|
||||
Has(ctx context.Context, id EntryID) (bool, error)
|
||||
}
|
||||
|
||||
type EntryIterator interface {
|
||||
Next() bool
|
||||
Entry() Entry
|
||||
}
|
||||
|
||||
type PayloadStore interface {
|
||||
Put(ctx context.Context, payload []byte) (PayloadID, error)
|
||||
Get(ctx context.Context, payloadID PayloadID) ([]byte, error)
|
||||
Delete(ctx context.Context, payloadID PayloadID) error
|
||||
type ReferenceStore interface {
|
||||
GetRef(ctx context.Context, name string) (EntryID, bool, error)
|
||||
SetRef(ctx context.Context, name string, entryID EntryID) (bool, error)
|
||||
RemoveRef(ctx context.Context, name string) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user