View Source Bonfire.Me.Settings (bonfire v0.3.5-classic-beta.10)

Link to this section Summary

Functions

Fetch all config & settings, both from Mix.Config and DB. Order matters!

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

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

Put a setting using a key like :key or list of nested keys like [:top_key, :sub_key]

Set several settings at once. Accepts nested attributes as map with string keys (which are transformed into keyword list), or a keyword list. Determines what scope to use & sets/updates settings for it.

Link to this section Functions

Link to this function

fetch_all_scopes(otp_app, opts)

View Source

Fetch all config & settings, both from Mix.Config and DB. Order matters!

Link to this function

get(key, default \\ nil, opts \\ [])

View Source

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

These two calls have the same result (i.e. specifying a module as the first key will add the OTP app of that module as the first key): get([:bonfire_me, Bonfire.Me.Users]) get(Bonfire.Me.Users)

Same with these two (i.e. not specifying a module or app as the first key will default to the main OTP app): get([:random_atom, :sub_key]) get([:bonfire, :random_atom, :sub_key])

Link to this function

get_all_ext!(module_or_otp_app, opts \\ [])

View Source
Link to this function

get_all_ext(module_or_otp_app, opts \\ [])

View Source

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

Link to this function

load_instance_settings()

View Source
Link to this function

map_put_in(root \\ %{}, keys, value)

View Source
Link to this function

maybe_fetch(scope, opts \\ [])

View Source

Put a setting using a key like :key or list of nested keys like [:top_key, :sub_key]

Link to this function

scoped_object(scope_tuple, opts \\ [])

View Source

Set several settings at once. Accepts nested attributes as map with string keys (which are transformed into keyword list), or a keyword list. Determines what scope to use & sets/updates settings for it.