Migation to monorepo

This commit is contained in:
2026-02-18 15:26:17 +08:00
parent 78f22a8320
commit 432fb9ba72
13 changed files with 33 additions and 199 deletions

24
chron-core/interfaces.go Normal file
View File

@@ -0,0 +1,24 @@
package chroncore
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
StoreBatch(ctx context.Context, entries []Entry) error
LoadBatch(ctx context.Context, ids []EntryID) ([]Entry, 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
List(ctx context.Context, prefix string) (map[string]EntryID, error)
SetBatch(ctx context.Context, refs map[string]EntryID) error
GetBatch(ctx context.Context, names []string) (map[string]EntryID, error)
}