Source code for cadrumo.application.modelo.review_package_recipient_registry_ports
"""Application-owned persistence capability for trusted recipients.Recipient registration is separate from recipient encryption: this capabilitystores and retrieves the taxpayer's trusted-public-key register, while therecipient-encryption capability seals and opens package bytes. The executablecomposition root supplies this required bucket-scoped capability; storagenamespaces, secure-object repositories, and their failures remain outward."""from__future__importannotationsfromdataclassesimportdataclassfromtypingimportTYPE_CHECKING,Protocol,runtime_checkableifTYPE_CHECKING:from.review_package_recipient_registryimportRecipientFingerprintRegister
[docs]@runtime_checkableclassRecipientFingerprintRegistryRepositoryPort(Protocol):"""Load and save the complete trusted-recipient register for one bucket."""
[docs]defload(self)->RecipientFingerprintRegister:"""Return the current register, or an empty register when absent."""...
[docs]defsave(self,register:RecipientFingerprintRegister)->None:"""Persist one validated register as the bucket's current state."""...
[docs]@dataclass(frozen=True,slots=True)classRecipientFingerprintRegistryPorts:"""Required trusted-recipient authority for one bucket-scoped call."""registry_repository:RecipientFingerprintRegistryRepositoryPort
[docs]classRecipientFingerprintRegistryPortsFactory(Protocol):"""Construct the trusted-recipient capability for one bucket."""def__call__(self,*,bucket_id:str)->RecipientFingerprintRegistryPorts:"""Return the registry capability bound to ``bucket_id``."""...