View Source PowAssent.Config (PowAssent v0.4.18)

Methods to parse and modify configurations.

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.

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

get_provider_config(config, provider)

View Source
@spec get_provider_config(t(), atom()) :: t() | no_return()

Gets the provider configuration from the provided configuration.

@spec get_providers(t()) :: t()

Gets the providers for the configuration.

Link to this function

merge_provider_config(config, provider, new_provider_config)

View Source
@spec 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.

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

Puts a new key value to the configuration.

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

Raise a ConfigError exception.