Table of Contents

Interface IEmailContentObjectBackend

Namespace
MailFathom.Application.EmailContent.Storage
Assembly
MailFathom.Application.dll

The object backend named directly, for the one use case whose subject is the object backend itself.

public interface IEmailContentObjectBackend

Remarks

Every other caller reaches content through IEmailContentStore, which is the port's promise: a use case stores and reads mail and never learns which store answered. The move of already-stored content is the exception that proves it — what it does is precisely to put a payload in the bucket and check that the bucket has it, so a port that hid the bucket would hide its subject.

It is a second port rather than the adapter's own, because an adapter's interface lives in the adapter: the infrastructure that speaks S3 is not visible from here, and the move is a use case rather than infrastructure. What this adds over the content store is the pair of operations addressed by an object key instead of by an owning row — which is exactly what a copy needs and what nothing else may have.

It is registered only where the deployment selected the object backend, so its absence is a fact a use case reads rather than a failure: a deployment writing to the database has nothing to move content into, and the move refuses to start rather than copying mail nowhere.

Methods

PlaceAsync(EmailContentKind, ReadOnlyMemory<byte>, CancellationToken)

Writes one payload under a key minted for this write, and answers with where it went.

ReadBackAsync(string, long, CancellationToken)

Reads back the object one key names, so what was written can be checked against what a row records.