Lamina.DSL (lamina v0.4.0)
Defines the macros used for building a configuration module.
Link to this section Summary
Functions
Defines an individual configration parameter.
Defines an individual configration parameter.
Defines a provider for the configuration system.
Defines a provider for the configuration system.
Link to this section Functions
Specs
config(Lamina.config_key()) :: Macro.t()
Defines an individual configration parameter.
The same as config/2, except that no block is provided.
Specs
Defines an individual configration parameter.
Arguments:
config_key- the name of the new configuration parameter to define.block- a "do block" which will be evaluated in the context of theLamina.DSL.Configmodule.
Example
config :listen_port do
cast(&Lamina.Cast.to_integer/1)
validate(&is_integer/1)
end
Specs
Defines a provider for the configuration system.
The same as provider/2, however passes an empty list to the provider's
init/1 function.
Specs
Defines a provider for the configuration system.
Arguments:
module- the name of a module which implements theLamina.Providerbehaviour.options- a keyword list of options to be passed to the provider'sinit/1function.
Example
provider(Lamina.Provider.Env, prefix: "HTTP")