19 lines
471 B
Go
19 lines
471 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, error)
|
|
Delete(ctx context.Context, name string) error
|
|
}
|