/// Geneos Toolkit library for building data samplers and integrations
///
/// This library provides utilities for creating Geneos Dataviews, handling environment variables
/// (including encrypted ones), and other helpers for working with the Geneos Toolkit.
///
/// Rows and columns are ordered by the order in which they are first added to the `Dataview`.
///
/// # Example
///
/// ```rust,no_run
/// use geneos_toolkit::prelude::*;
///
/// fn main() -> Result<(), Box<dyn std::error::Error>> {
///     let clear_env_var = get_var_or("CLEAR_ENV_VAR", "Default")?;
///
///     let dataview = Dataview::builder()
///         .set_row_header("Process")
///         .add_headline("Hostname", &hostname::get().unwrap_or_default().to_string_lossy())
///         .add_headline("Timestamp", &chrono::Utc::now().to_rfc3339())
///         .add_headline("Clear Env Var", &clear_env_var)
///         .add_value("process1", "Status", "Running")
///         .add_value("process1", "CPU", "2.5%")
///         .add_value("process1", "Memory", "150MB")
///         .build()?;
///
///     println!("{}", dataview);
///     Ok(())
/// }
/// ```
pub mod dataview;
pub mod env;

#[cfg(feature = "secure-env")]
pub mod secure_env;

pub mod prelude {
    pub use crate::dataview::{Dataview, Row, print_result_and_exit};
    pub use crate::env::{get_var, get_var_or, is_encrypted};
    #[cfg(feature = "secure-env")]
    pub use crate::secure_env::{decrypt, get_secure_var, get_secure_var_or};
    #[cfg(feature = "secure-env")]
    pub use zeroize::Zeroizing;
}
