cadrumo.adapters.persistence.profile.catalogue_reads module

Persistence adapters for the invoice link-consistency read port.

Core types: InvoiceCatalogue, TransactionCatalogue, TransactionCatalogueRepository.

class InvoiceCatalogueReadAdapter(*, repository)[source]

Bases: InvoiceCatalogueReader

Translate the encrypted invoice repository to the application read port.

Parameters:

repository (InvoiceCatalogueRepository)

property bucket_id: str | None

Return the bucket the wrapped repository reads.

load()[source]

Load the catalogue while hiding persistence implementation errors.

Return type:

InvoiceCatalogue

class TransactionCatalogueReadAdapter(*, repository)[source]

Bases: TransactionCatalogueReader

Translate the encrypted transaction repository to the application read port.

Parameters:

repository (TransactionCatalogueRepository)

property bucket_id: str | None

Return the bucket the wrapped repository reads.

load()[source]

Load the catalogue while hiding persistence implementation errors.

Return type:

TransactionCatalogue

partition_by_date_range(start, end)[source]

Partition the catalogue while hiding persistence implementation errors.

Return type:

LedgerDatePartition

Parameters:
build_invoice_catalogue_read_ports(*, bucket_id)[source]

Bind both encrypted catalogue repositories to one profile bucket.

Return type:

InvoiceCatalogueReadPorts

Parameters:

bucket_id (str)