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
Helper function to start or restart the GenServer when already started with given settings
Specs
get :: Map.t
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"}
Called by the supervisor, this will use settings defined in config.exs or ENV vars