View Source Bonfire.Common.Config (bonfire v0.3.5-classic-beta.10)

Link to this section Summary

Functions

Get config value for a config key (optionally from a specific OTP app or Bonfire extension)

Get all config keys/values for a specific Bonfire extension or OTP app

Get config value for a Bonfire extension or OTP app config key

Constructs a key path for settings/config, which always starts with an app or extension name (which defaults to the main OTP app)

Stop if an Elixir module or extension / OTP app doesn't have configuration keys set up

Link to this section Functions

Link to this macro

compilation_error(error)

View Source (macro)
Link to this function

delete(key, otp_app \\ top_level_otp_app())

View Source
Link to this function

get!(key, otp_app \\ top_level_otp_app())

View Source
Link to this function

get(key_or_keys, default \\ nil, otp_app \\ nil)

View Source

Get config value for a config key (optionally from a specific OTP app or Bonfire extension)

Link to this function

get_ext!(module_or_otp_app)

View Source
Link to this function

get_ext!(module_or_otp_app, key)

View Source
Link to this function

get_ext(module_or_otp_app)

View Source

Get all config keys/values for a specific Bonfire extension or OTP app

Link to this function

get_ext(module_or_otp_app, key, default \\ nil)

View Source

Get config value for a Bonfire extension or OTP app config key

Constructs a key path for settings/config, which always starts with an app or extension name (which defaults to the main OTP app)

iex> keys_tree([:bonfire_me, Bonfire.Me.Users]) [:bonfire_me, Bonfire.Me.Users]

iex> keys_tree(Bonfire.Me.Users) [:bonfire_me, Bonfire.Me.Users]

iex> keys_tree(:bonfire_me) [:bonfire_me]

iex> keys_tree(:random_atom) [:bonfire, :random_atom]

iex>keys_tree([:random_atom, :sub_key]) [:bonfire, :random_atom, :sub_key]

See Bonfire.Common.Extend.module_enabled?/1.

Link to this function

put(key, value, otp_app \\ nil)

View Source
Link to this function

require_extension_config!(extension)

View Source

Stop if an Elixir module or extension / OTP app doesn't have configuration keys set up