From bf75c0e9cfc94841b7c2fda7093bae973f1e242f Mon Sep 17 00:00:00 2001
From: Georgi Michev <georgi.michev@vereign.com>
Date: Fri, 27 Jan 2023 15:57:11 +0200
Subject: [PATCH] Update the readme for sync tool

Update the optional statuses.
Update the "usage example" to allow connection to the DB.
---
 cmd/sync/README.md | 16 ++++++++--------
 cmd/sync/temp      |  1 +
 2 files changed, 9 insertions(+), 8 deletions(-)
 create mode 160000 cmd/sync/temp

diff --git a/cmd/sync/README.md b/cmd/sync/README.md
index 187d384f..b214f0cf 100644
--- a/cmd/sync/README.md
+++ b/cmd/sync/README.md
@@ -35,7 +35,7 @@ Basic usage documentation is available when executing the following command on M
 The flags passed to the script are as follows:
 ```    
     -dbAddr string
-        Mongo DB connection string.    
+        Mongo DB connection string.
     -dbUser string
         Mongo DB username.
     -dbPass string
@@ -43,20 +43,20 @@ The flags passed to the script are as follows:
     -repoURL string
         Policy repository URL.
     -repoUser string
-        GIT Server username.        
+        GIT Server username - optional 
     -repoPass string
-        GIT Server password.
+        GIT Server password - optional
     -repoFolder string
-        Folder where the tool scans for policies
+        Folder where the tool scans for policies - optional
     -branch string
-        GIT branch for explicit checkout. This flag is optional.
+        GIT branch for explicit checkout - optional
     -keepAlive bool
-        Keep alive the service (e.g.for containers)
+        Keep alive the service (e.g.for containers) - optional
     -syncInterval time.Duration
-        Sync interval given as time duration string (e.g. 1s, 10m, 1h30m)
+        Sync interval given as time duration string (e.g. 1s, 10m, 1h30m) - optional
 ```
 
 Usage example:
 ```shell
-./sync -repoURL="https://path/to/repo.git" -repoUser="user" -repoPass="pass" -dbAddr="mongodb://localhost:27017/policy" -dbUser="user" -dbPass="pass" -branch="feature-branch" -keepAlive=true -syncInterval=20s
+./sync -repoURL="https://path/to/repo.git" -repoUser="user" -repoPass="pass" -dbAddr="mongodb://localhost:27017/policy?directConnection=true" -dbUser="user" -dbPass="pass" -branch="feature-branch" -keepAlive=true -syncInterval=20s
 ```
diff --git a/cmd/sync/temp b/cmd/sync/temp
new file mode 160000
index 00000000..a3d8bd0b
--- /dev/null
+++ b/cmd/sync/temp
@@ -0,0 +1 @@
+Subproject commit a3d8bd0b85d95b05353f8dd9a1069f724a8039ea
-- 
GitLab