2021-04-10 11:35:10 +00:00
|
|
|
const DEFAULT_CONFIG_YAML: &str = include_str!("config.yml");
|
2021-04-09 17:32:37 +00:00
|
|
|
|
2021-04-10 11:35:10 +00:00
|
|
|
use crate::config::{self, Config};
|
2021-04-09 17:32:37 +00:00
|
|
|
use lazy_static::lazy_static;
|
|
|
|
|
|
|
|
lazy_static! {
|
2021-04-10 11:35:10 +00:00
|
|
|
static ref DEFAULT_CONFIG: Config = serde_yaml::from_str(DEFAULT_CONFIG_YAML).unwrap();
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn version() -> String {
|
|
|
|
DEFAULT_CONFIG.version.clone()
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn general() -> config::GeneralConfig {
|
|
|
|
DEFAULT_CONFIG.general.clone()
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn node_types() -> config::NodeTypesConfig {
|
|
|
|
DEFAULT_CONFIG.node_types.clone()
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn modes() -> config::ModesConfig {
|
|
|
|
DEFAULT_CONFIG.modes.clone()
|
2021-04-09 17:32:37 +00:00
|
|
|
}
|