cadrumo.application.ledger.evidence_ports module¶
Application-owned capabilities for purchase-invoice evidence.
The evidence service coordinates a bucket catalogue, secure attachment custody, and bucket-event history. The concrete encrypted repositories and attachment manifest service are composed by an executable root and translated into these narrow application contracts before they reach the service.
- class PurchaseInvoiceEvidenceRepositoryProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolBucket-scoped evidence catalogue capability.
- class EvidenceAttachmentIngestRequest(bucket_id, source_path, media_kind, mime_type, captured_at, actor)[source]¶
Bases:
objectApplication facts needed to place one evidence file in secure custody.
- Parameters:
-
source_path:
Path¶
- class EvidenceAttachmentIngestorProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolCapability that stores evidence bytes and returns their content address.
- ingest(request)[source]¶
Store the admitted file and return its content-addressed identifier.
- Return type:
TypeAliasType- Parameters:
request (EvidenceAttachmentIngestRequest)
- class LedgerEvidencePorts(evidence_repository, attachment_ingestor, bucket_event_repository)[source]¶
Bases:
objectRequired authorities for one purchase-invoice evidence invocation.
- Parameters:
evidence_repository (PurchaseInvoiceEvidenceRepositoryProtocol)
attachment_ingestor (EvidenceAttachmentIngestorProtocol)
bucket_event_repository (BucketEventHistoryRepositoryProtocol)
-
evidence_repository:
PurchaseInvoiceEvidenceRepositoryProtocol¶
-
attachment_ingestor:
EvidenceAttachmentIngestorProtocol¶
-
bucket_event_repository:
BucketEventHistoryRepositoryProtocol¶