PowAssent.Config (PowAssent v0.4.10) View Source

Methods to parse and modify configurations.

Link to this section Summary

Functions

Gets the key value from the configuration.

Gets the provider configuration from the provided configuration.

Gets the providers for the configuration.

Puts a new key value to the configuration.

Raise a ConfigError 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

get_provider_config(config, provider)

View Source

Specs

get_provider_config(t(), atom()) :: t() | no_return()

Gets the provider configuration from the provided configuration.

Specs

get_providers(t()) :: t()

Gets the providers for the configuration.

Link to this function

merge_provider_config(config, provider, new_provider_config)

View Source

Specs

merge_provider_config(t(), atom(), t()) :: t()

Merge new config for provider.

The new config values are deep merged with the existing provider config. Any conflicting keys from the default config for the strategy will be fetched and the provider config deep merged unto it.

Specs

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

Puts a new key value to the configuration.

Specs

raise_error(binary()) :: no_return()

Raise a ConfigError exception.