Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Commit 110eb96

Browse files
committed
Renaming modules for consistency
1 parent 4e5d636 commit 110eb96

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

apps/cvmfs_gateway/src/cvmfs_auth.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,14 @@ p_check_hmac(Message, KeyId, HMAC) ->
264264
-spec p_reload_repo_config() -> {ok, CfgVer} | {error, Reason}
265265
when CfgVer :: integer(), Reason :: term().
266266
p_reload_repo_config() ->
267-
Cfg = config:read(repo_config, config:default_repo_config()),
267+
Cfg = cvmfs_config:read(repo_config, cvmfs_config:default_repo_config()),
268268

269269
CfgVer = maps:get(version, Cfg, 1),
270270

271271
ets:delete_all_objects(repos),
272272
ets:delete_all_objects(keys),
273273

274-
case config:load(Cfg) of
274+
case cvmfs_config:load(Cfg) of
275275
{ok, Repos, Keys} ->
276276
case CfgVer of
277277
1 ->

apps/cvmfs_gateway/src/config.erl renamed to apps/cvmfs_gateway/src/cvmfs_config.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
%%% @end
66
%%%-------------------------------------------------------------------
77

8-
-module(config).
8+
-module(cvmfs_config).
99

1010
-include_lib("eunit/include/eunit.hrl").
1111

@@ -49,7 +49,7 @@ default_user_config() ->
4949
% Load the repository and user configuration
5050
%
5151
% Load the repository and user configuration from a configuration map.
52-
% The output of the "config:read" function returns a configuration map
52+
% The output of the "cvmfs_config:read" function returns a configuration map
5353
% that can be passed to this function.
5454
load(Cfg) ->
5555
load(Cfg, fun(K) -> load_key(K) end).
@@ -137,14 +137,14 @@ load_key(#{type := <<"plain_text">>, id := Id, secret := Secret, repo_subpath :=
137137
load_key(#{type := <<"plain_text">>, id := Id, secret := Secret}) ->
138138
#{id => Id, secret => Secret};
139139
load_key(#{type := <<"file">>, file_name := FileName, repo_subpath := Path}) ->
140-
case keys:parse_file(FileName) of
140+
case cvmfs_keys:parse_file(FileName) of
141141
{ok, <<"plain_text">>, I, S} ->
142142
#{id => I, secret => S, path => Path};
143143
{error, Reason} ->
144144
throw(Reason)
145145
end;
146146
load_key(#{type := <<"file">>, file_name := FileName}) ->
147-
case keys:parse_file(FileName) of
147+
case cvmfs_keys:parse_file(FileName) of
148148
{ok, <<"plain_text">>, I, S} ->
149149
#{id => I, secret => S};
150150
{error, Reason} ->

apps/cvmfs_gateway/src/cvmfs_gateway_app.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
%%====================================================================
1919

2020
start(_StartType, _StartArgs) ->
21-
UserVars = config:read(user_config, config:default_user_config()),
21+
UserVars = cvmfs_config:read(user_config, cvmfs_config:default_user_config()),
2222

2323
LogLevel = maps:get(log_level, UserVars, <<"info">>),
2424
ok = set_lager_log_level(LogLevel),

apps/cvmfs_gateway/src/keys.erl renamed to apps/cvmfs_gateway/src/cvmfs_keys.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
%%% @end
66
%%%-------------------------------------------------------------------
77

8-
-module(keys).
8+
-module(cvmfs_keys).
99

1010
-include_lib("eunit/include/eunit.hrl").
1111

@@ -71,10 +71,10 @@ valid_key_files_test() ->
7171
<<" plain_text id secret ">>,
7272
<<"\tplain_text\tid\tsecret\t">>,
7373
<<" \t plain_text \t id \t secret \t \n ">>],
74-
[?assert({ok, <<"plain_text">>, <<"id">>, <<"secret">>} =:= keys:parse_binary(D)) || D <- Data].
74+
[?assert({ok, <<"plain_text">>, <<"id">>, <<"secret">>} =:= cvmfs_keys:parse_binary(D)) || D <- Data].
7575

7676
invalid_key_files_test() ->
7777
Data = [<<"plane_text id secret">>,
7878
<<"plain_textid secret">>,
7979
<<"plain_text id secret garbage">>],
80-
[?assert({error, invalid_format} =:= keys:parse_binary(D)) || D <- Data].
80+
[?assert({error, invalid_format} =:= cvmfs_keys:parse_binary(D)) || D <- Data].

0 commit comments

Comments
 (0)