Files
chron/core/interfaces.go

18 lines
459 B
Go

package core
import (
"context"
)
type EntryStore interface {
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 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
}