Lamina.Server.ConfigValue (lamina v0.4.0)
A wrapper around an individual configuration value.
It makes the code much simpler. That is all.
Link to this section 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.
Link to this section Types
Link to this type
config_key()
Specs
config_key() :: atom()
Link to this type
lifetime()
Specs
lifetime() :: Lamina.Provider.lifetime()
Link to this type
provider()
Specs
provider() :: module()
Link to this type
provider_index()
Specs
provider_index() :: pos_integer()
Specs
t() :: %Lamina.Server.ConfigValue{ config_key: atom(), expires_at: nil | pos_integer(), lifetime: lifetime(), module: module(), provider: module(), provider_index: pos_integer(), value: any() }
Link to this section Functions
Link to this function
cast(config_value)
Specs
Perform a value cast using the ConfigValue's module.
Link to this function
expired?(config_value)
Specs
Has the ConfigValue expired?
Link to this function
init(config_key, lifetime, module, provider, provider_index, value)
Specs
init(config_key(), lifetime(), module(), provider(), provider_index(), any()) :: {:ok, t()} | {:error, ArgumentError.t()}
Initialise a new ConfigValue.
Link to this function
validate(config_value)
Specs
Perform a value validation using the ConfigValue's module.