Files
drive/apps/backend/internal/virtualfs/key_resolver.go

22 lines
606 B
Go
Raw Normal View History

2025-11-27 20:49:58 +00:00
package virtualfs
import (
"context"
"github.com/get-drexa/drexa/internal/blob"
)
type BlobKeyResolver interface {
// 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
2025-11-27 20:49:58 +00:00
Resolve(ctx context.Context, node *Node) (blob.Key, error)
2025-11-30 01:16:44 +00:00
ResolveDeletionKeys(ctx context.Context, node *Node, allKeys []blob.Key) (*DeletionPlan, error)
2025-11-27 20:49:58 +00:00
}
2025-11-30 01:16:44 +00:00
type DeletionPlan struct {
Prefix blob.Key
Keys []blob.Key
2025-11-27 20:49:58 +00:00
}