Config.Local (secret_config v1.0.0)
Handles parsing of local YAML configurations, providing functionality to load configurations from YAML strings or files, applying environment-specific interpolations and imports.
Link to this section Summary
Functions
Reads and parses a YAML file into a configuration state, applying local imports and environment variable interpolation.
Parses a YAML string into a configuration state, applying environment variable interpolation.
Link to this section Functions
Link to this function
parse_file(file, env)
Specs
Reads and parses a YAML file into a configuration state, applying local imports and environment variable interpolation.
Parameters
- file: The path to the YAML file to be read and parsed.
- env: The environment context used for interpolation and imports.
Returns
- A tuple containing
:local, the environment, and the parsed state as a map.
Link to this function
parse_yaml(yaml_str, env)
Specs
Parses a YAML string into a configuration state, applying environment variable interpolation.
Parameters
- yaml_str: The YAML string to be parsed.
- env: The environment context used for interpolation.
Returns
- A tuple containing
:local, the environment, and the parsed state as a map.