View Source dotenv_config_parser behaviour (dotenv_config v2.3.3)
Summary
Types
-type config_item_name() :: binary().
-type config_item_raw_value() :: binary().
-type config_item_type() :: simple_config_type() | [exact_value() | simple_config_type()] | convert_function().
-type config_item_value() :: any().
-type convert_function() :: fun((config_item_raw_value()) -> config_item_value()).
-type exact_value() :: {exact, binary()}.
-type parsed_config() :: [{config_item_name(), config_item_value()}].
-type parsed_config_raw() :: #{config_item_name() => config_item_raw_value()}.
-type parser() :: [{config_item_name(), config_item_type()}].
-type simple_config_type() :: str | int | bool | json | atom | module | charlist.
Callbacks
-callback get_parser() -> parser().
Functions
-spec parse_config(parsed_config_raw(), module()) -> {ok, parsed_config()}.
-spec parse_file(file:name_all()) -> {ok, parsed_config_raw()} | {error, any()}.