fix(bridge_v2): name and copyright header
This commit is contained in:
parent
ca2cdbc08d
commit
bdab421885
|
@ -1,3 +1,20 @@
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
|
%%
|
||||||
|
%% Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
%% you may not use this file except in compliance with the License.
|
||||||
|
%% You may obtain a copy of the License at
|
||||||
|
%%
|
||||||
|
%% http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
%%
|
||||||
|
%% Unless required by applicable law or agreed to in writing, software
|
||||||
|
%% distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
%% See the License for the specific language governing permissions and
|
||||||
|
%% limitations under the License.
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
%% This function is called to register a bridge V2. It should be called before
|
%% This function is called to register a bridge V2. It should be called before
|
||||||
%% the system boots in a function triggered by an -on_load() directive
|
%% the system boots in a function triggered by an -on_load() directive
|
||||||
%% since it should be called before the system boots because the config
|
%% since it should be called before the system boots because the config
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
%% Getting registered bridge schemas:
|
%% Getting registered bridge schemas:
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
bridge_v2_type_to_schame_stuct_field/1,
|
bridge_v2_type_to_schame_struct_field/1,
|
||||||
registered_schema_modules/0
|
registered_schema_modules/0
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ on_load() ->
|
||||||
end,
|
end,
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
bridge_v2_type_to_schame_stuct_field(BridgeV2Type) ->
|
bridge_v2_type_to_schame_struct_field(BridgeV2Type) ->
|
||||||
InfoMap = persistent_term:get(internal_emqx_bridge_v2_persistent_term_info_key()),
|
InfoMap = persistent_term:get(internal_emqx_bridge_v2_persistent_term_info_key()),
|
||||||
Map = maps:get(bridge_v2_type_to_schema_struct_field, InfoMap),
|
Map = maps:get(bridge_v2_type_to_schema_struct_field, InfoMap),
|
||||||
maps:get(BridgeV2Type, Map).
|
maps:get(BridgeV2Type, Map).
|
||||||
|
|
|
@ -156,7 +156,7 @@ fields(actions) ->
|
||||||
|
|
||||||
registered_schema_fields() ->
|
registered_schema_fields() ->
|
||||||
[
|
[
|
||||||
Module:fields(emqx_bridge_v2:bridge_v2_type_to_schame_stuct_field(BridgeV2Type))
|
Module:fields(emqx_bridge_v2:bridge_v2_type_to_schame_struct_field(BridgeV2Type))
|
||||||
|| {BridgeV2Type, Module} <- emqx_bridge_v2:registered_schema_modules()
|
|| {BridgeV2Type, Module} <- emqx_bridge_v2:registered_schema_modules()
|
||||||
].
|
].
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue