CFG.Config (cfg_lib v0.0.1) View Source
This module contains top-level functionality for working with CFG. Client code will usually just interact with this module.
Link to this section Summary
Functions
Append or prepend a list of directories to the include path of this configuration.
Return this configuration as a map, recursing into included configurations.
Returns a specification to start this module under a supervisor.
Return a configuration from a file, given its path.
Return a configuration from its source.
Get a value from this configuration by key or path, with an optional default value if not found. If no default is specified and a value isn't found, an error will be returned.
Get the include path of this configuration.
See whether this configuration allows duplicates.
See whether this configuration uses a cache.
See if the specified value is a configuration.
Load this configuration from a file, given its path.
Return a new, empty configuration with specified options.
Set whether this configuration uses a cache.
Set the include path of this configuration to the specified list of directories.
Set whether this configuration allows duplicates.
Set the path from which this configuration was loaded. This is also used to determine the directory searched for included configurations.
Link to this section Types
Specs
t() :: %CFG.Config{ cache: nil | map(), context: nil | map(), data: nil | map(), error: term(), include_path: list(), no_duplicates: boolean(), parent: nil | pid(), path: nil | binary(), refs_seen: term(), root_dir: nil | binary(), scalar_tokens: term(), strict_conversions: boolean(), string_converter: function() }
Link to this section Functions
Specs
Append or prepend a list of directories to the include path of this configuration.
Specs
Return this configuration as a map, recursing into included configurations.
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
Return a configuration from a file, given its path.
Specs
Return a configuration from its source.
Specs
Get a value from this configuration by key or path, with an optional default value if not found. If no default is specified and a value isn't found, an error will be returned.
Specs
Get the include path of this configuration.
Specs
See whether this configuration allows duplicates.
Specs
See whether this configuration uses a cache.
Specs
See if the specified value is a configuration.
Specs
Load this configuration from a file, given its path.
Specs
Return a new, empty configuration with specified options.
Specs
Set whether this configuration uses a cache.
Specs
Set the include path of this configuration to the specified list of directories.
Specs
Set whether this configuration allows duplicates.
Specs
Set the path from which this configuration was loaded. This is also used to determine the directory searched for included configurations.