refactor: replace KeyMode with ShouldPersistKey

This commit is contained in:
2025-11-30 15:02:37 +00:00
parent 6984bb209e
commit 1c1392a0a1
5 changed files with 11 additions and 15 deletions

View File

@@ -7,7 +7,10 @@ import (
)
type BlobKeyResolver interface {
KeyMode() blob.KeyMode
// ShouldPersistKey returns true if the resolved key should be stored in node.BlobKey.
// Flat keys (e.g. UUIDs) return true - key is generated once and stored.
// Hierarchical keys return false - key is derived from path each time.
ShouldPersistKey() bool
Resolve(ctx context.Context, node *Node) (blob.Key, error)
ResolveDeletionKeys(ctx context.Context, node *Node, allKeys []blob.Key) (*DeletionPlan, error)
}