jaydoane commented on a change in pull request #3568:
URL: https://github.com/apache/couchdb/pull/3568#discussion_r644113226



##########
File path: src/aegis/src/aegis.erl
##########
@@ -33,50 +31,47 @@ init_db(#{} = Db, Options) ->
         is_encrypted => aegis_server:init_db(Db, Options)
     }.
 
-
 open_db(#{} = Db) ->
     Db#{
         is_encrypted => aegis_server:open_db(Db)
     }.
 
-
 get_db_info(#{is_encrypted := IsEncrypted} = Db) ->
-    KeyManagerInfo = case erlang:function_exported(?AEGIS_KEY_MANAGER, 
get_db_info, 1) of
-        true ->
-            ?AEGIS_KEY_MANAGER:get_db_info(Db);
-        false ->
-            []
-    end,
+    KeyManagerInfo =
+        case erlang:function_exported(?AEGIS_KEY_MANAGER, get_db_info, 1) of

Review comment:
       -1

##########
File path: src/aegis/src/aegis.erl
##########
@@ -33,50 +31,47 @@ init_db(#{} = Db, Options) ->
         is_encrypted => aegis_server:init_db(Db, Options)
     }.
 
-
 open_db(#{} = Db) ->
     Db#{
         is_encrypted => aegis_server:open_db(Db)
     }.
 
-
 get_db_info(#{is_encrypted := IsEncrypted} = Db) ->
-    KeyManagerInfo = case erlang:function_exported(?AEGIS_KEY_MANAGER, 
get_db_info, 1) of
-        true ->
-            ?AEGIS_KEY_MANAGER:get_db_info(Db);
-        false ->
-            []
-    end,
+    KeyManagerInfo =
+        case erlang:function_exported(?AEGIS_KEY_MANAGER, get_db_info, 1) of
+            true ->
+                ?AEGIS_KEY_MANAGER:get_db_info(Db);
+            false ->
+                []
+        end,
     [{enabled, IsEncrypted}, {key_manager, {KeyManagerInfo}}].
 
-
 encrypt(#{} = _Db, _Key, <<>>) ->
     <<>>;
-
 encrypt(#{is_encrypted := false}, _Key, Value) when is_binary(Value) ->
     Value;
-
-encrypt(#{is_encrypted := true} = Db, Key, Value)
-        when is_binary(Key), is_binary(Value) ->
+encrypt(#{is_encrypted := true} = Db, Key, Value) when
+    is_binary(Key), is_binary(Value)
+->

Review comment:
       -3




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to