feat: hiden auto_subscribe conf

This commit is contained in:
Zhongwen Deng 2023-04-13 09:26:16 +08:00
parent f668ad7b9e
commit a70930fed0
2 changed files with 12 additions and 3 deletions

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*- %% -*- mode: erlang -*-
{application, emqx_auto_subscribe, [ {application, emqx_auto_subscribe, [
{description, "Auto subscribe Application"}, {description, "Auto subscribe Application"},
{vsn, "0.1.3"}, {vsn, "0.1.4"},
{registered, []}, {registered, []},
{mod, {emqx_auto_subscribe_app, []}}, {mod, {emqx_auto_subscribe_app, []}},
{applications, [ {applications, [

View File

@ -31,14 +31,18 @@
namespace() -> "auto_subscribe". namespace() -> "auto_subscribe".
roots() -> roots() ->
["auto_subscribe"]. [{"auto_subscribe", ?HOCON(?R_REF("auto_subscribe"), #{importance => ?IMPORTANCE_HIDDEN})}].
fields("auto_subscribe") -> fields("auto_subscribe") ->
[ [
{topics, {topics,
?HOCON( ?HOCON(
?ARRAY(?R_REF("topic")), ?ARRAY(?R_REF("topic")),
#{desc => ?DESC(auto_subscribe), default => []} #{
desc => ?DESC(auto_subscribe),
default => [],
importance => ?IMPORTANCE_HIDDEN
}
)} )}
]; ];
fields("topic") -> fields("topic") ->
@ -47,26 +51,31 @@ fields("topic") ->
?HOCON(binary(), #{ ?HOCON(binary(), #{
required => true, required => true,
example => topic_example(), example => topic_example(),
importance => ?IMPORTANCE_HIDDEN,
desc => ?DESC("topic") desc => ?DESC("topic")
})}, })},
{qos, {qos,
?HOCON(emqx_schema:qos(), #{ ?HOCON(emqx_schema:qos(), #{
default => 0, default => 0,
importance => ?IMPORTANCE_HIDDEN,
desc => ?DESC("qos") desc => ?DESC("qos")
})}, })},
{rh, {rh,
?HOCON(range(0, 2), #{ ?HOCON(range(0, 2), #{
default => 0, default => 0,
importance => ?IMPORTANCE_HIDDEN,
desc => ?DESC("rh") desc => ?DESC("rh")
})}, })},
{rap, {rap,
?HOCON(range(0, 1), #{ ?HOCON(range(0, 1), #{
default => 0, default => 0,
importance => ?IMPORTANCE_HIDDEN,
desc => ?DESC("rap") desc => ?DESC("rap")
})}, })},
{nl, {nl,
?HOCON(range(0, 1), #{ ?HOCON(range(0, 1), #{
default => 0, default => 0,
importance => ?IMPORTANCE_HIDDEN,
desc => ?DESC(nl) desc => ?DESC(nl)
})} })}
]. ].