SharedSettings.Store behaviour (shared_settings v0.2.0)
A behaviour module for persistent store adapters
All data values are represented by strings (similar to Redis). This means that, regardless of what adaptor is being implemented, all adaptors must accept and return data in the format which we will outline.
Storage adaptors are only responsible for storing the setting as-given and returning it in the expected format. Here is a list of formats and their string representation:
number: "1234" string: "any string" boolean: "1" or "0" range: "low,high". eg: "1,5" inclusive
Link to this section Summary
Callbacks
Deletes a setting, identified by name.
Retrieves a setting by name.
Retrieves all settings
Persists a setting
Link to this section Callbacks
Link to this callback
delete(name)
Specs
Deletes a setting, identified by name.
Link to this callback
get(name)
Specs
Retrieves a setting by name.
Link to this callback
get_all()
Specs
get_all() :: {:ok, [SharedSettings.Setting.t()]}
Retrieves all settings
Link to this callback
put(setting)
Specs
Persists a setting