pub enum StorageNewSubCommand {
Local {
path: PathBuf,
name: String,
},
Generic {
name: String,
init_command: String,
list_command: String,
download_command: String,
upload_command: String,
delete_command: String,
max_processes: usize,
url: Option<String>,
storage_dir: Option<String>,
},
Rsync {
name: String,
host: String,
port: Option<usize>,
user: Option<String>,
storage_dir: String,
},
S3 {
name: String,
storage_prefix: String,
bucket_name: String,
region: String,
},
Minio {
name: String,
endpoint: String,
bucket_name: String,
region: String,
storage_prefix: String,
},
DigitalOcean {
name: String,
bucket_name: String,
region: String,
storage_prefix: String,
},
R2 {
name: String,
account_id: String,
bucket_name: String,
storage_prefix: String,
},
Gcs {
name: String,
bucket_name: String,
region: String,
storage_prefix: String,
},
Wasabi {
name: String,
bucket_name: String,
endpoint: String,
storage_prefix: String,
},
}Expand description
Add a new storage
Variants§
Local
Fields
Add a new local storage
A local storage is a directory accessible from the local file system. Xvc will use common file operations for this directory without accessing the network.
Generic
Fields
init_command: StringCommand to initialize the storage. This command is run once after defining the storage.
You can use {URL} and {STORAGE_DIR} as shortcuts.
list_command: StringCommand to list the files in storage
You can use {URL} and {STORAGE_DIR} placeholders and define values for these with –url and –storage_dir options.
download_command: StringCommand to download a file from storage.
You can use {URL} and {STORAGE_DIR} placeholders and define values for these with –url and –storage_dir options.
upload_command: StringCommand to upload a file to storage.
You can use {URL} and {STORAGE_DIR} placeholders and define values for these with –url and –storage_dir options.
Add a new generic storage.
⚠️ Please note that this is an advanced method to configure storages. You may damage your repository and local and remote files with incorrect configurations.
Please see https://docs.xvc.dev/ref/xvc-storage-new-generic.html for examples and make necessary backups before continuing.
Rsync
Fields
port: Option<usize>Port number for the connection in the form 22. Doesn’t add port number to connection string if not given.
Add a new rsync storages
Uses rsync in separate processes to communicate. This can be used when you already have an SSH/Rsync connection.
S3
Fields
Add a new S3 storage
Minio
Fields
Add a new Minio storage
DigitalOcean
Fields
Add a new Digital Ocean storage
R2
Fields
Add a new R2 storage
Gcs
Fields
Add a new Google Cloud Storage storage
Wasabi
Fields
Add a new Wasabi storage
Trait Implementations§
source§impl Clone for StorageNewSubCommand
impl Clone for StorageNewSubCommand
source§fn clone(&self) -> StorageNewSubCommand
fn clone(&self) -> StorageNewSubCommand
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for StorageNewSubCommand
impl Debug for StorageNewSubCommand
source§impl FromArgMatches for StorageNewSubCommand
impl FromArgMatches for StorageNewSubCommand
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
ArgMatches to self.source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
ArgMatches to self.source§impl Subcommand for StorageNewSubCommand
impl Subcommand for StorageNewSubCommand
source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand