refactor(emqx_bridge_greptimedb): use typerefl alias

This commit is contained in:
Zaiming (Stone) Shi 2023-11-08 19:44:58 +01:00
parent 46fffa401e
commit 3e2ce57cb1
2 changed files with 7 additions and 3 deletions

View File

@ -126,7 +126,7 @@ desc(_) ->
undefined.
write_syntax(type) ->
emqx_bridge_influxdb:write_syntax();
emqx_bridge_influxdb:write_syntax_type();
write_syntax(required) ->
true;
write_syntax(validator) ->

View File

@ -11,7 +11,8 @@
-import(hoconsc, [mk/2, enum/1, ref/2]).
-export([
conn_bridge_examples/1
conn_bridge_examples/1,
write_syntax_type/0
]).
-export([
@ -29,6 +30,9 @@
%% -------------------------------------------------------------------------------------------------
%% api
write_syntax_type() ->
typerefl:alias("string", write_syntax()).
conn_bridge_examples(Method) ->
[
#{
@ -154,7 +158,7 @@ desc(_) ->
undefined.
write_syntax(type) ->
?MODULE:write_syntax();
write_syntax_type();
write_syntax(required) ->
true;
write_syntax(validator) ->