View Source Pow.Config (Pow v1.0.38)

Functions to parse and modify configurations.

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.

Types

Functions

Link to this function

get(config, key, default \\ nil)

View Source
@spec 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
@spec merge(t(), t()) :: t()

Merges two configurations.

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

Puts a new key value to the configuration.

@spec raise_error(binary()) :: no_return()

Raise a ConfigError exception.

@spec repo!(t()) :: atom()

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

@spec user!(t()) :: atom()

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