| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- %%-*- 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", [
- {default, ""},
- {datatype, string}
- ]}.
- {mapping, "web.hook.ssl.certfile", "emqx_web_hook.certfile", [
- {default, ""},
- {datatype, string}
- ]}.
- {mapping, "web.hook.ssl.keyfile", "emqx_web_hook.keyfile", [
- {default, ""},
- {datatype, string}
- ]}.
- {mapping, "web.hook.ssl.verify", "emqx_web_hook.verify", [
- {default, false},
- {datatype, {enum, [true, false]}}
- ]}.
- {mapping, "web.hook.ssl.server_name_indication", "emqx_web_hook.server_name_indication", [
- {datatype, string}
- ]}.
- {mapping, "web.hook.pool_size", "emqx_web_hook.pool_size", [
- {default, 32},
- {datatype, integer}
- ]}.
- {mapping, "web.hook.enable_pipelining", "emqx_web_hook.enable_pipelining", [
- {default, true},
- {datatype, {enum, [true, false]}}
- ]}.
- {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}.
|