Files
chron/core/interfaces.go

19 lines
477 B
Go

package core
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
}
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
}