| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- %%-*- mode: erlang -*-
- %% EMQ X R3.0 config mapping
- {mapping, "web.hook.url", "emqx_web_hook.url", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.headers.$name", "emqx_web_hook.headers", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.body.encoding_of_payload_field", "emqx_web_hook.encoding_of_payload_field", [
- {default, plain},
- {datatype, {enum, [plain, base62, base64]}}
- ]}.
- {mapping, "web.hook.ssl.cacertfile", "emqx_web_hook.cacertfile", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.ssl.certfile", "emqx_web_hook.certfile", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.ssl.keyfile", "emqx_web_hook.keyfile", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.ssl.verify", "emqx_web_hook.verify", [
- {default, false},
- {datatype, {enum, [true, false]}}
- ]}.
- {mapping, "web.hook.pool_size", "emqx_web_hook.pool_size", [
- {default, 32},
- {datatype, integer}
- ]}.
- {mapping, "web.hook.rule.client.connect.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.client.connack.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.client.connected.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.client.disconnected.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.client.subscribe.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.client.unsubscribe.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.session.subscribed.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.session.unsubscribed.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.session.terminated.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.message.publish.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.message.acked.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.rule.message.delivered.$name", "emqx_web_hook.rules", [
- {datatype, string}
- ]}.
- {translation, "emqx_web_hook.headers", fun(Conf) ->
- Headers = cuttlefish_variable:filter_by_prefix("web.hook.headers", Conf),
- [{K, V} || {[_, _, _, K], V} <- Headers]
- end}.
- {translation, "emqx_web_hook.rules", fun(Conf) ->
- Hooks = cuttlefish_variable:filter_by_prefix("web.hook.rule", Conf),
- lists:map(
- fun({[_, _, _,Name1,Name2, _], Val}) ->
- {lists:concat([Name1,".",Name2]), Val}
- end, Hooks)
- end}.
|