feat: config crate with legacy env names

This commit is contained in:
2026-10-25 21:00:42 +01:00
parent ab4e4c3138
commit 8bdf55cfe1
20 changed files with 1025 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
#[derive(Debug, thiserror::Error)]
pub enum ConfigError {
#[error("configuration file {0} was named by CONFIG_FILE but does not exist")]
NamedFileMissing(String),
#[error("{0} is required but not set")]
Missing(&'static str),
#[error("invalid value for {variable}: {reason}")]
Invalid { variable: String, reason: String },
#[error("could not read configuration: {0}")]
Unreadable(#[from] Box<figment::Error>),
}