View Source dotenv_config_parser behaviour (dotenv_config v1.2.0)

Summary

Types

-type config_item_name() :: binary().
Link to this type

config_item_raw_value/0

View Source
-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 simple_config_type() :: str | int | bool | json | atom | module | charlist.

Callbacks

-callback get_parser() -> parser().

Functions

Link to this function

parse_config(Config, Module)

View Source
-spec parse_config(parsed_config_raw(), module()) -> {ok, parsed_config()}.
-spec parse_file(file:name_all()) -> {ok, parsed_config_raw()} | {error, any()}.