Grouper.Data.App (Grouper v0.1.0) View Source

data layer driver for :application implied groups

Link to this section Summary

Functions

delete data value of a given type and a given key

enumerates all key-values of a given type

get data value of a given type and a given key

initialize application-driven data

store data value of a given type and a given key

Link to this section Types

Link to this section Functions

Link to this function

del(app_name, type, key)

View Source

Specs

del(meta(), type(), key()) :: value() | nil

delete data value of a given type and a given key

Specs

enum(meta(), type()) :: [{{type(), key()}, value()}] | [{key(), value()}]

enumerates all key-values of a given type

Specify the special type :_ to read data of all types

Link to this function

get(app_name, type, key)

View Source

Specs

get(meta(), type(), key()) :: value() | nil

get data value of a given type and a given key

Specs

init(meta(), opts :: keyword()) :: :ok

initialize application-driven data

This may load OTP environment data. It only attempts to either load or suppress loading the first time it's called. Given that loading is the default, it is necessary to suppress loading the environment very early in application loading if this is desired.

Options

  • load_otp_env: Set to true to load the current application's environment (the default), to an atom to load a specific applications environment, or to false to suppress loading any environment.
Link to this function

put(app_name, type, key, val)

View Source

Specs

put(meta(), type(), key(), value()) :: value() | nil

store data value of a given type and a given key