refactor(emqx_bridge_greptimedb): use typerefl alias
This commit is contained in:
parent
46fffa401e
commit
3e2ce57cb1
|
@ -126,7 +126,7 @@ desc(_) ->
|
||||||
undefined.
|
undefined.
|
||||||
|
|
||||||
write_syntax(type) ->
|
write_syntax(type) ->
|
||||||
emqx_bridge_influxdb:write_syntax();
|
emqx_bridge_influxdb:write_syntax_type();
|
||||||
write_syntax(required) ->
|
write_syntax(required) ->
|
||||||
true;
|
true;
|
||||||
write_syntax(validator) ->
|
write_syntax(validator) ->
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
-import(hoconsc, [mk/2, enum/1, ref/2]).
|
-import(hoconsc, [mk/2, enum/1, ref/2]).
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
conn_bridge_examples/1
|
conn_bridge_examples/1,
|
||||||
|
write_syntax_type/0
|
||||||
]).
|
]).
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
|
@ -29,6 +30,9 @@
|
||||||
%% -------------------------------------------------------------------------------------------------
|
%% -------------------------------------------------------------------------------------------------
|
||||||
%% api
|
%% api
|
||||||
|
|
||||||
|
write_syntax_type() ->
|
||||||
|
typerefl:alias("string", write_syntax()).
|
||||||
|
|
||||||
conn_bridge_examples(Method) ->
|
conn_bridge_examples(Method) ->
|
||||||
[
|
[
|
||||||
#{
|
#{
|
||||||
|
@ -154,7 +158,7 @@ desc(_) ->
|
||||||
undefined.
|
undefined.
|
||||||
|
|
||||||
write_syntax(type) ->
|
write_syntax(type) ->
|
||||||
?MODULE:write_syntax();
|
write_syntax_type();
|
||||||
write_syntax(required) ->
|
write_syntax(required) ->
|
||||||
true;
|
true;
|
||||||
write_syntax(validator) ->
|
write_syntax(validator) ->
|
||||||
|
|
Loading…
Reference in New Issue