Pow.Config (Pow v1.0.25) View Source

Methods to parse and modify configurations.

Link to this section Summary

Functions

Gets the key value from the configuration.

Merges two configurations.

Puts a new key value to the configuration.

Raise a ConfigError exception.

Retrieves the repo module from the config, or raises an exception.

Retrieves the user schema module from the config, or raises an exception.

Link to this section Types

Link to this section Functions

Link to this function

get(config, key, default \\ nil)

View Source

Specs

get(t(), atom(), any()) :: any()

Gets the key value from the configuration.

If not found, it'll fall back to environment config, and lastly to the default value which is nil if not specified.

Link to this function

merge(l_config, r_config)

View Source

Specs

merge(t(), t()) :: t()

Merges two configurations.

Specs

put(t(), atom(), any()) :: t()

Puts a new key value to the configuration.

Specs

raise_error(binary()) :: no_return()

Raise a ConfigError exception.

Specs

repo!(t()) :: atom()

Retrieves the repo module from the config, or raises an exception.

Specs

user!(t()) :: atom()

Retrieves the user schema module from the config, or raises an exception.