View Source amoc_config_attributes (amoc v3.3.0)
Summary
Types
-type attribute_name() :: required_variable | override_variable.
-type error() :: {error, error_type(), reason()}.
-type error_type() :: atom().
-type maybe_module_attribute() :: module_attribute() | term().
-type maybe_module_config() :: {ok, [module_parameter()]} | error().
-type maybe_update_fun() :: update_fun() | fun((_, _) -> any()).
-type maybe_update_method() :: update_method() | term().
-type maybe_verification_fun() :: verification_fun() | fun((_) -> any()).
-type maybe_verification_method() :: verification_method() | term().
-type module_attribute() :: #{name := name(), description := string(), default_value => value(), verification => verification_method(), update => update_method()}.
-type module_parameter() :: #module_parameter{name :: name(), mod :: module(), value :: value(), description :: string(), verification_fn :: maybe_verification_fun(), update_fn :: maybe_update_fun() | read_only}.
-type name() :: atom().
-type one_of() :: [value(), ...].
-type reason() :: any().
-type update_method() :: read_only | none | mfa(2) | update_fun().
-type value() :: any().
-type verification_method() :: none | one_of() | mfa(1) | verification_fun().
Functions
-spec get_module_configuration(attribute_name(), module()) -> maybe_module_config().
-spec none(any()) -> true.