fix(bridge_v2): name and copyright header

This commit is contained in:
Kjell Winblad 2023-11-07 07:48:09 +01:00 committed by Ivan Dyachkov
parent ca2cdbc08d
commit bdab421885
3 changed files with 20 additions and 3 deletions

View File

@ -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
%% the system boots in a function triggered by an -on_load() directive
%% since it should be called before the system boots because the config

View File

@ -42,7 +42,7 @@
%% Getting registered bridge schemas:
-export([
bridge_v2_type_to_schame_stuct_field/1,
bridge_v2_type_to_schame_struct_field/1,
registered_schema_modules/0
]).
@ -195,7 +195,7 @@ on_load() ->
end,
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()),
Map = maps:get(bridge_v2_type_to_schema_struct_field, InfoMap),
maps:get(BridgeV2Type, Map).

View File

@ -156,7 +156,7 @@ fields(actions) ->
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()
].