cadrumo.adapters.persistence.profile.invoice_confirmation module

Persistence adapter for the invoice-confirmation capability.

The application confirmation flow consumes the public attachment-store protocol. This module binds that protocol to the encrypted attachment store for one bucket and translates storage failures into the application-owned confirmation error before they cross the boundary.

class InvoiceConfirmationAttachmentStoreAdapter(*, store)[source]

Bases: AttachmentStoreProtocol

Translate the encrypted attachment store to the confirmation port.

Parameters:

store (AttachmentStore)

put_bytes(data)[source]

Store bytes while translating persistence failures.

Return type:

str

Parameters:

data (bytes)

put_file(source)[source]

Store a file while translating persistence failures.

Return type:

tuple[str, int]

Parameters:

source (Path)

read_bytes(sha256)[source]

Read bytes while translating persistence failures.

Return type:

bytes

Parameters:

sha256 (str)

write_manifest(attachment)[source]

Write a manifest while translating persistence failures.

Return type:

None

Parameters:

attachment (Attachment)

load_manifest(attachment_id)[source]

Load a manifest while preserving an ordinary domain miss.

Return type:

Attachment

Parameters:

attachment_id (str)

iter_manifests()[source]

Iterate manifests while translating failures raised during iteration.

Return type:

Iterator[Attachment]

verify_blob(attachment_id)[source]

Verify one blob while translating persistence failures.

Return type:

None

Parameters:

attachment_id (str)

build_invoice_confirmation_ports(*, bucket_id)[source]

Bind encrypted attachment custody to one profile bucket.

Return type:

InvoiceConfirmationPorts

Parameters:

bucket_id (str)