Skip to content

Commit

Permalink
Updated CLI docs in --help. (#52)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Kirilin <[email protected]>
  • Loading branch information
s3rius authored Mar 6, 2022
1 parent 696206c commit 3a64138
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -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,
Expand All @@ -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>,
}
Expand Down

0 comments on commit 3a64138

Please sign in to comment.