cloudex v0.2.1 Cloudex.Settings

This is a GenServer that contains the API settings for cloudinary You can interact with the get function to retreive the settings you want.

Link to this section Summary

Functions

Helper function to start or restart the GenServer when already started with given settings

Get the cloudinary credentials as map

Get a specific cloudinary credential by key

Actually starting the GenServer with given settings

Called by the supervisor, this will use settings defined in config.exs or ENV vars

Helper function to stop the GenServer

Link to this section Functions

Link to this function do_start(error)

Helper function to start or restart the GenServer when already started with given settings

Link to this function get()
get() :: map

Get the cloudinary credentials as map.

Examples

Cloudex.Settings.get
> %{api_key: "mykey", secret: "s3cr3t", cloud_name: "heaven"}

Get a specific cloudinary credential by key.

Examples

Cloudex.Settings.get(:secret)
> "s3cr3t"

Cloudex.Settings.get(:bogus)
> {:error, "key not found"}
Link to this function start(settings)

Actually starting the GenServer with given settings

Link to this function start(atom, list)

Called by the supervisor, this will use settings defined in config.exs or ENV vars

Helper function to stop the GenServer