Skip to main content

Crate affinidi_messaging_mediator_config

Crate affinidi_messaging_mediator_config 

Source
Expand description

Raw TOML configuration schema for the Affinidi Messaging Mediator.

This crate holds only the serde deserialization types that mirror the mediator’s mediator.toml — the *ConfigRaw structs and their plain-serde sub-structs. Every field is the on-disk shape (mostly String, parsed into typed/runtime values later).

It is intentionally dependency-light (serde + the lean tier of affinidi-messaging-mediator-common, for DatabaseConfigRaw). The resolved runtime Config — opened secret backends, JWT keys, the DID-resolver client, the VTA refresher — and all ConfigRaw → Config conversions stay in the mediator binary, which re-exports these types so existing crate::common::config::* paths keep resolving.

The goal (mediator simplification T18) is one schema, two consumers: the mediator and (later) the mediator-setup wizard, which today renders this TOML by hand with no shared types. Env-var override logic and boot-time validation move here in a follow-up (T18b), once they carry a crate-local error type instead of the mediator’s server-tier MediatorError.

Re-exports§

pub use error::ConfigError;

Modules§

env
Config file reading + environment-variable overrides.
error
Error type for config loading.
validate
Boot-time configuration invariant checks.

Structs§

ConfigRaw
Raw configuration deserialized from the TOML file, converted to the runtime Config in the mediator binary.
DIDResolverConfig
DID resolver configuration.
DatabaseConfigRaw
[database] section schema (raw, all-strings TOML form).
ForwardingConfigRaw
LimitsConfigRaw
MessageExpiryCleanupConfigRaw
ProcessorsConfigRaw
SecretsConfigRaw
[secrets] config section — the unified secret-storage backend.
SecurityConfigRaw
ServerConfig
SessionExpiryCleanupConfigRaw
StorageConfig
[storage] section — selects the mediator’s storage backend. Mirrors the wizard recipe shape so a mediator.toml produced by the wizard parses unchanged.
StreamingConfig
Live streaming configuration