ferrule-config 0.2.0-alpha

Connection registry, profiles, and the layered credential-resolution stack (CLI flag / env / OS keyring / file via hasp) for the ferrule database CLI.
Documentation
use thiserror::Error;

/// Errors originating in `ferrule-config`.
#[derive(Error, Debug)]
pub enum ConfigError {
    #[error("config file not found: {0}")]
    ConfigNotFound(String),

    #[error("invalid config: {0}")]
    InvalidConfig(String),

    #[error("connection '{0}' not found in registry")]
    ConnectionNotFound(String),

    #[error("duplicate connection name: {0}")]
    DuplicateConnection(String),

    #[error("profile '{0}' not found")]
    ProfileNotFound(String),

    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error("hasp error: {0}")]
    HaspError(String),
}