Copyright © 2018 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
model_callback() = m_get | m_post | m_delete
model_name() = binary() | atom()
opt_message() = mqtt_packet_map:mqtt_message() | undefined
path() = [path_element()]
path_element() = atom() | binary() | term()
verb() = get | post | delete
call/5 | |
callback/5 | |
get_arg/3 | |
get_module/2 | Find the model module in the module index. |
payload_msg/1 | |
publish/5 | |
template_get/3 | Called by the compiled templates for a model lookup. |
call(Model::model_name(), Verb::verb(), Path::path(), Msg::opt_message(), Context::z:context()) -> {ok, term()} | {error, term()}
callback(Model::model_name(), Verb::verb(), Path::path(), Msg::mqtt_packet_map:mqtt_message(), Context::z:context()) -> {ok, term()} | {error, term()}
get_arg(Prop::atom(), Map::map() | undefined, Context::z:context()) -> term() | undefined
get_module(Name::atom() | binary(), Context::z:context()) -> {ok, module()} | {error, term()}
Find the model module in the module index. The model must be either an atom or a binary.
payload_msg(Payload::term()) -> opt_message()
publish(Model::model_name(), Verb::verb(), Path::path(), Msg::opt_message(), Context::z:context()) -> {ok, term()} | {error, term()}
template_get(Path::path(), Model::model_name(), Context::z:context()) -> {ok, {term(), path()}} | {error, term()}
Called by the compiled templates for a model lookup.
Generated by EDoc