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§
- Config
Raw - Raw configuration deserialized from the TOML file, converted to the runtime
Configin the mediator binary. - DIDResolver
Config - DID resolver configuration.
- Database
Config Raw [database]section schema (raw, all-strings TOML form).- Forwarding
Config Raw - Limits
Config Raw - Message
Expiry Cleanup Config Raw - Processors
Config Raw - Secrets
Config Raw [secrets]config section — the unified secret-storage backend.- Security
Config Raw - Server
Config - Session
Expiry Cleanup Config Raw - Storage
Config [storage]section — selects the mediator’s storage backend. Mirrors the wizard recipe shape so amediator.tomlproduced by the wizard parses unchanged.- Streaming
Config - Live streaming configuration