Additions to domain/ and workspace/ chron-note packages
This commit is contained in:
14
chron-note/internal/stores/cas/cas.go
Normal file
14
chron-note/internal/stores/cas/cas.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package cas
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.michelsen.id/phill/chron/chron-note/internal/domain"
|
||||
)
|
||||
|
||||
type Store interface {
|
||||
Put(ctx context.Context, data []byte) (domain.BlobID, error) // id = blake3-256(data)
|
||||
Get(ctx context.Context, id domain.BlobID) ([]byte, error)
|
||||
Has(ctx context.Context, id domain.BlobID) (bool, error)
|
||||
Remove(ctx context.Context, id domain.BlobID) error
|
||||
}
|
||||
Reference in New Issue
Block a user