cloudex v0.0.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.

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

Functions

do_start(error)

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

get()

Specs

get :: Map.t

Get the cloudinary credentials as map.

Examples

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

Get a specific cloudinary credential by key.

Examples

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

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

Actually starting the GenServer with given settings

start(atom, list)

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

stop()

Helper function to stop the GenServer