chore: rm unused macro and func, fix unchanged product name
This commit is contained in:
parent
188d876b1c
commit
0ee3e49db7
|
@ -39,8 +39,6 @@
|
|||
|
||||
-export([acl_conf_file/0]).
|
||||
|
||||
-export([ph_to_re/1]).
|
||||
|
||||
-type(source() :: map()).
|
||||
|
||||
-type(match_result() :: {matched, allow} | {matched, deny} | nomatch).
|
||||
|
@ -371,6 +369,3 @@ type(Unknown) -> error({unknown_authz_source_type, Unknown}).
|
|||
%% @doc where the acl.conf file is stored.
|
||||
acl_conf_file() ->
|
||||
filename:join([emqx:data_dir(), "authz", "acl.conf"]).
|
||||
|
||||
ph_to_re(VarPH) ->
|
||||
re:replace(VarPH, "[\\$\\{\\}]", "\\\\&", [global, {return, list}]).
|
||||
|
|
|
@ -27,27 +27,6 @@
|
|||
-define(BAD_REQUEST, 'BAD_REQUEST').
|
||||
-define(NOT_FOUND, 'NOT_FOUND').
|
||||
|
||||
-define(EXAMPLE_REDIS,
|
||||
#{type=> redis,
|
||||
enable => true,
|
||||
server => <<"127.0.0.1:3306">>,
|
||||
redis_type => single,
|
||||
pool_size => 1,
|
||||
auto_reconnect => true,
|
||||
cmd => <<"HGETALL mqtt_authz">>}).
|
||||
-define(EXAMPLE_FILE,
|
||||
#{type=> file,
|
||||
enable => true,
|
||||
rules => <<"{allow,{username,\"^dashboard?\"},subscribe,[\"$SYS/#\"]}.\n",
|
||||
"{allow,{ipaddr,\"127.0.0.1\"},all,[\"$SYS/#\",\"#\"]}.">>
|
||||
}).
|
||||
|
||||
-define(EXAMPLE_RETURNED,
|
||||
#{sources => [ ?EXAMPLE_REDIS
|
||||
, ?EXAMPLE_FILE
|
||||
]
|
||||
}).
|
||||
|
||||
-define(IS_TRUE(Val), ((Val =:= true) or (Val =:= <<"true">>))).
|
||||
|
||||
-define(API_SCHEMA_MODULE, emqx_authz_api_schema).
|
||||
|
|
|
@ -147,7 +147,7 @@ fields(plugin) ->
|
|||
required => true,
|
||||
example => "emqx_plugin_template-5.0-rc.1"})
|
||||
},
|
||||
{author, hoconsc:mk(list(string()), #{example => [<<"EMQ X Team">>]})},
|
||||
{author, hoconsc:mk(list(string()), #{example => [<<"EMQX Team">>]})},
|
||||
{builder, hoconsc:ref(?MODULE, builder)},
|
||||
{built_on_otp_release, hoconsc:mk(string(), #{example => "24"})},
|
||||
{compatibility, hoconsc:mk(map(), #{example => #{<<"emqx">> => <<"~>5.0">>}})},
|
||||
|
@ -195,7 +195,7 @@ fields(name) ->
|
|||
fields(builder) ->
|
||||
[
|
||||
{contact, hoconsc:mk(string(), #{example => "emqx-support@emqx.io"})},
|
||||
{name, hoconsc:mk(string(), #{example => "EMQ X Team"})},
|
||||
{name, hoconsc:mk(string(), #{example => "EMQX Team"})},
|
||||
{website, hoconsc:mk(string(), #{example => "www.emqx.com"})}
|
||||
];
|
||||
fields(position) ->
|
||||
|
|
Loading…
Reference in New Issue