From 0ce03c30b5bc98418484f73c33b6e35555daab18 Mon Sep 17 00:00:00 2001
From: Pavel Kirilin <win10@list.ru>
Date: Sun, 6 Mar 2022 21:30:59 +0400
Subject: [PATCH] Updated CLI docs in --help. (#52)

Signed-off-by: Pavel Kirilin <win10@list.ru>
---
 src/config.rs | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/config.rs b/src/config.rs
index f1d862c..78dbc02 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -25,9 +25,21 @@ pub struct StorageOptions {
     #[structopt(long, env = "RUSTUS_DATA_DIR", default_value = "./data")]
     pub data_dir: PathBuf,
 
+    /// Storage directory structure.
+    /// This template shows inner directory structure.
+    /// You can use following variables:
+    /// day, month, year or even environment variables.
+    /// Example: "/year/month/day/env[HOSTNAME]/".
+    ///
     #[structopt(long, env = "RUSTUS_DIR_STRUCTURE", default_value = "")]
     pub dir_structure: String,
 
+    /// Forces fsync call after writing chunk to filesystem.
+    /// This parameter can help you when working with
+    /// Network file systems. It guarantees that
+    /// everything is written on disk correctly.
+    ///
+    /// In most cases this parameter is redundant.
     #[structopt(long, parse(from_flag))]
     pub force_fsync: bool,
 }
@@ -112,6 +124,7 @@ pub struct NotificationsOptions {
     #[structopt(long, env = "RUSTUS_HOOKS_AMQP_EXCHANGE", default_value = "rustus")]
     pub hooks_amqp_exchange: String,
 
+    /// Prefix for all AMQP queues.
     #[cfg(feature = "amqp_notifier")]
     #[structopt(
         long,
@@ -120,9 +133,13 @@ pub struct NotificationsOptions {
     )]
     pub hooks_amqp_queues_prefix: String,
 
+    /// Directory for executable hook files.
+    /// This parameter is used to call executables from dir.
     #[structopt(long, env = "RUSTUS_HOOKS_DIR")]
     pub hooks_dir: Option<PathBuf>,
 
+    /// Executable file which must be called for
+    /// notifying about upload status.
     #[structopt(long, env = "RUSTUS_HOOKS_FILE")]
     pub hooks_file: Option<String>,
 }
-- 
GitLab