cadrumo.adapters.outbound.storage.records module¶
Pydantic records and enums for the outbound storage abstraction.
Provider records anchor the storage boundary:
adapters.outbound.storage.protocol.StorageProvider- synchronous bytes-in / bytes-out provider Protocol.ProviderKind- closed enum naming the v1 backends.ProviderObjectMetadata- per-object metadata returned by listing / fetching operations. Carries the object key HMAC, namespace, byte size, content hash, and backend-native identifier.ProviderProbeReport- health-probe result. Reports whether the backend is reachable, writable, and (when applicable) bound to the expected root folder. Theread_onlyfield surfaces whether the probe ran in read-only mode (no sentinel-write round-trip).RemoteMirrorObjectManifest,RemoteMirrorNamespaceManifest,RemoteMirrorIssue, andRemoteMirrorInspection- immutable manifest and inspection records for remote ciphertext mirror reconciliation byadapters.outbound.storage.mirror_manifest.
- class ProviderKind(*values)[source]¶
Bases:
StrEnumClosed storage backend selector for
adapters.outbound.storage.factory.get_storage_provider().- LOCAL_FILESYSTEM¶
- GOOGLE_DRIVE¶
- class RemoteMirrorIssueKind(*values)[source]¶
Bases:
StrEnumRemote ciphertext mirror degradation classes carried by
RemoteMirrorIssue.- PARTIAL_UPLOAD¶
- PARTIAL_DOWNLOAD¶
- STALE_MIRROR¶
- REVISION_CONFLICT¶
- class ProviderObjectMetadata(**data)[source]¶
Bases:
BaseModelPer-object metadata returned by storage-provider operations.
Returned by
adapters.outbound.storage.protocol.StorageProvidermethods:adapters.outbound.storage.protocol.StorageProvider.put(),adapters.outbound.storage.protocol.StorageProvider.get(), andadapters.outbound.storage.protocol.StorageProvider.iter_objects().provider_object_idis the backend-native identifier (a filesystem path for the local provider, a DrivefileIdfor the Google Drive provider). The coordinator threads it through subsequent get/delete/patch calls without re-resolving by name.- Parameters:
data (Any)
- namespace: str¶
- object_key_hmac: str¶
- provider_object_id: str¶
- byte_length: NonNegativeInt¶
- content_hash: str¶
- written_at: datetime¶
- class ProviderProbeReport(**data)[source]¶
Bases:
BaseModelHealth-check result returned by storage-provider probes.
Returned by
adapters.outbound.storage.protocol.StorageProvider.probe().reachableis True iff the backend endpoint responds at all.writableis True iff a sentinel payload write/delete succeeded; inherently False when the probe runs in read-only mode.root_folder_presentis non-None only when the backend supports the notion of an operator-configured root folder (currently Google Drive).- Parameters:
data (Any)
- provider_kind: ProviderKind¶
- reachable: bool¶
- writable: bool¶
- read_only: bool¶
- root_folder_present: bool | None¶
- detail: str¶
- class RemoteMirrorObjectManifest(**data)[source]¶
Bases:
BaseModelOne ciphertext object entry recorded in a
RemoteMirrorNamespaceManifest.- Parameters:
data (Any)
- namespace: str¶
- object_key_hmac: _ObjectKeyHmac¶
- classification: str¶
- schema_version: int¶
- byte_length: NonNegativeInt¶
- ciphertext_hash: _CiphertextHash¶
- storage_revision_id: _StorageRevisionId | None¶
- previous_storage_revision_id: _StorageRevisionId | None¶
- revision_ancestor_ids: tuple[_StorageRevisionId, ...]¶
- row_written_at: datetime¶
- revision_written_at: datetime | None¶
- class RemoteMirrorNamespaceManifest(**data)[source]¶
Bases:
BaseModelManifest persisted beside remote ciphertext objects for one namespace.
Built by
adapters.outbound.storage.mirror_manifest.build_remote_mirror_namespace_manifest()and persisted byadapters.outbound.storage.mirror_manifest.put_remote_mirror_namespace_manifest().- Parameters:
data (Any)
- manifest_schema_version: int¶
- namespace: str¶
- object_count: NonNegativeInt¶
- latest_revision_id: _StorageRevisionId | None¶
- latest_revision_written_at: datetime | None¶
- objects: tuple[RemoteMirrorObjectManifest, ...]¶