gleamunison/config
Types
pub type Config {
Config(
env: dict.Dict(String, ConfigValue),
toml: dict.Dict(String, ConfigValue),
cli: dict.Dict(String, ConfigValue),
)
}
Constructors
-
Config( env: dict.Dict(String, ConfigValue), toml: dict.Dict(String, ConfigValue), cli: dict.Dict(String, ConfigValue), )
pub type ConfigValue {
StringVal(String)
IntVal(Int)
BoolVal(Bool)
}
Constructors
-
StringVal(String) -
IntVal(Int) -
BoolVal(Bool)
Values
pub fn get(
config: Config,
key: String,
) -> Result(ConfigValue, Nil)
pub fn get_string(
config: Config,
key: String,
) -> Result(String, Nil)