Table of Contents

Class SecretResolutionResult

Namespace
MailFathom.Infrastructure.Secrets.Resolution
Assembly
MailFathom.Infrastructure.dll

The outcome of resolving one secret-bearing configuration value.

public sealed record SecretResolutionResult : IEquatable<SecretResolutionResult>
Inheritance
SecretResolutionResult
Implements
Inherited Members

Remarks

An unresolved reference is an expected configuration failure with a named cause rather than an exceptional state, so resolution returns this instead of throwing and the host reports every failure of a startup at once. A failed result carries no material and no target, which is what keeps it safe to include in an operator message.

Properties

Failure

Gets why no material was produced, or null when resolution succeeded.

Secret

Gets the resolved material, owned by the caller, or null when resolution failed.

Source

Gets where the material came from, or null when resolution failed.

Succeeded

Gets whether material was produced.

Methods

Failed(SecretResolutionFailure)

Creates a failed result.

Resolved(ResolvedSecret, SecretMaterialSource)

Creates a successful result that hands ownership of the material to the caller.