Lamina. Server. ConfigValue
(lamina v0.4.4)
Copy Markdown
A wrapper around an individual configuration value.
It makes the code much simpler. That is all.
Summary
Functions
Perform a value cast using the ConfigValue's module.
Has the ConfigValue expired?
Initialise a new ConfigValue.
Perform a value validation using the ConfigValue's module.
Types
@type config_key() :: atom()
@type lifetime() :: Lamina.Provider.lifetime()
@type provider() :: module()
@type provider_index() :: pos_integer()
@type t() :: %Lamina.Server.ConfigValue{ config_key: atom(), expires_at: nil | pos_integer(), lifetime: lifetime(), module: module(), provider: module(), provider_index: pos_integer(), value: any() }
Functions
Perform a value cast using the ConfigValue's module.
Has the ConfigValue expired?
@spec init(config_key(), lifetime(), module(), provider(), provider_index(), any()) :: {:ok, t()} | {:error, Exception.t()}
Initialise a new ConfigValue.
Perform a value validation using the ConfigValue's module.