Skip to content

Commit

Permalink
feat: hiden auto_subscribe conf
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwencool committed Apr 13, 2023
1 parent f668ad7 commit a70930f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/emqx_auto_subscribe/src/emqx_auto_subscribe.app.src
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_auto_subscribe, [
{description, "Auto subscribe Application"},
{vsn, "0.1.3"},
{vsn, "0.1.4"},
{registered, []},
{mod, {emqx_auto_subscribe_app, []}},
{applications, [
Expand Down
13 changes: 11 additions & 2 deletions apps/emqx_auto_subscribe/src/emqx_auto_subscribe_schema.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@
namespace() -> "auto_subscribe".

roots() ->
["auto_subscribe"].
[{"auto_subscribe", ?HOCON(?R_REF("auto_subscribe"), #{importance => ?IMPORTANCE_HIDDEN})}].

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

0 comments on commit a70930f

Please sign in to comment.