Lamina.Server.ConfigValue (lamina v0.4.2)
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
Link to this type
config_key()
@type config_key() :: atom()
Link to this type
lifetime()
@type lifetime() :: Lamina.Provider.lifetime()
Link to this type
provider()
@type provider() :: module()
Link to this type
provider_index()
@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
Link to this function
cast(config_value)
Perform a value cast using the ConfigValue's module.
Link to this function
expired?(config_value)
Has the ConfigValue expired?
Link to this function
init(config_key, lifetime, module, provider, provider_index, value)
@spec init(config_key(), lifetime(), module(), provider(), provider_index(), any()) :: {:ok, t()} | {:error, Exception.t()}
Initialise a new ConfigValue.
Link to this function
validate(config_value)
Perform a value validation using the ConfigValue's module.