Kuddle.Config (Kuddle Config v0.3.0) View Source
Utility module for handling various sources of configuration using Kuddle.
Link to this section Summary
Functions
Load a config map from a given kdl blob.
Load config from a directory, the extensions of the config files must be supplied as well.
Load config from a given kuddle document.
Load a KDL config file
Link to this section Functions
Specs
Load a config map from a given kdl blob.
Usage:
{:ok, config} = Kuddle.Config.load_config_blob("""
my_application {
key "value"
key2 subkey="subvalue"
}
""")
Load config from a directory, the extensions of the config files must be supplied as well.
Usage:
{:ok, config} =
Kuddle.Config.load_config_directory("/path/to/kdl/config/directory", [".kdl", ".kuddle"])
Specs
load_config_document(Kuddle.document(), Keyword.t()) :: {:ok, Keyword.t()} | {:error, term()}
Load config from a given kuddle document.
Usage:
=
Kuddle.Config.load_config_document(document)
Specs
Load a KDL config file
Usage:
{:ok, config} = Kuddle.Config.load_config_file("/path/to/kdl/config/file")