ExMixpanel.Config (ex_mixpanel v0.1.4)

Utility that handles interaction with the application's configuration

Link to this section Summary

Functions

In config.exs, use a string, a function or a tuple

Resolves the given key from the application's configuration returning the wrapped expanded value. If the value was a function it get's evaluated, if the value is a touple of three elements it gets applied.

In config.exs, use a string, a function or a tuple

In config.exs, use a string, a function or a tuple

Link to this section Functions

In config.exs, use a string, a function or a tuple:

config :ex_mixpanel, project_id: System.get_env("MIXPANEL_EXPORT_PROJECT_ID")

or:

config :ex_mixpanel, project_id: {:system, "MIXPANEL_EXPORT_PROJECT_ID"}

or:

config :ex_mixpanel, project_id: {MyApp.Config, :project_id, []}
Link to this function

resolve(key, default \\ nil)

Specs

resolve(atom(), any()) :: any()

Resolves the given key from the application's configuration returning the wrapped expanded value. If the value was a function it get's evaluated, if the value is a touple of three elements it gets applied.

In config.exs, use a string, a function or a tuple:

config :ex_mixpanel, secret: System.get_env("MIXPANEL_EXPORT_SECRET")

or:

config :ex_mixpanel, secret: {:system, "MIXPANEL_EXPORT_SECRET"}

or:

config :ex_mixpanel, secret: {MyApp.Config, :secret, []}

In config.exs, use a string, a function or a tuple:

config :ex_mixpanel, username: System.get_env("MIXPANEL_EXPORT_USERNAME")

or:

config :ex_mixpanel, username: {:system, "MIXPANEL_EXPORT_USERNAME"}

or:

config :ex_mixpanel, username: {MyApp.Config, :username, []}