aeat.domain.buckets._protocols module¶
Domain-level repository Protocol for the bucket-event-history catalogue.
Application-layer code that persists or loads bucket event catalogues
depends on BucketEventHistoryRepositoryProtocol, not on the concrete
secure-object-backed BucketEventHistoryRepository. This keeps callers
typed against the narrow port while the concrete repository owns the adapter
integration.
BucketEventHistoryRepositoryProtocol abstracts exists / load /
save operations over BucketEventHistoryCatalogue, allowing
services to emit BucketEvent history without importing the concrete
BucketEventHistoryRepository.
- class BucketEventHistoryRepositoryProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolNarrow domain-facing repository contract for the bucket-event-history catalogue.
Any object that provides
exists,load, andsaveover a per-bucketBucketEventHistoryCataloguesatisfies this protocol. The production implementation isBucketEventHistoryRepository.- load()[source]¶
Return the persisted catalogue or an empty catalogue if absent.
- Return type:
- Returns:
The
BucketEventHistoryCatalogueloaded from storage.
- save(catalogue)[source]¶
Persist
cataloguein the encrypted database object store.- Parameters:
catalogue (
BucketEventHistoryCatalogue) – TheBucketEventHistoryCatalogueto persist.- Return type: