aeat.domain.attachments._protocols module¶
Protocol declaration for the attachment store boundary.
Domain-layer protocol that the adapter-layer concrete implementation
must satisfy. The concrete implementation is exported as
adapters.persistence.storage.AttachmentStore; this module keeps
the domain free of adapter imports.
- class AttachmentStoreProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolStructural protocol for an attachment storage backend.
The domain service layer (
_service.py) accepts any object that satisfies this protocol. The concrete SQL-backed implementation isadapters.persistence.storage.AttachmentStore.- write_manifest(attachment)[source]¶
Persist
attachmentas a manifest record.- Return type:
- Parameters:
attachment (Attachment)
- load_manifest(attachment_id)[source]¶
Load and validate the manifest for
attachment_id.- Return type:
- Returns:
The validated
Attachmentmanifest record.- Parameters:
attachment_id (str)
- iter_manifests()[source]¶
Iterate over every
Attachmentmanifest in sorted attachment-id order.- Return type: