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
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.
Fields
Generic
Add a new generic storage.
⚠️ Please note that this is an advanced method to configure storages. You may damage your repository and local and storage files with incorrect configurations.
Please see https://docs.xvc.dev/ref/xvc-storage-new-generic.html for examples and make necessary backups.
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.
Rsync
Add a new rsync storages
Uses rsync in separate processes to communicate. This can be used when you already have an SSH/Rsync connection. It doesn’t prompt for any passwords. The connection must be set up with ssh keys beforehand.
Fields
port: Option<usize>Port number for the connection in the form 22. Doesn’t add port number to connection string if not given.
S3
Add a new S3 storage
Reads credentials from AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.
Alternatively you can use XVC_STORAGE_ACCESS_KEY_ID_<storage_name> and
XVC_STORAGE_SECRET_ACCESS_KEY_<storage_name> environment variables if you have multiple storages of this type.
Fields
Minio
Add a new Minio storage
Reads credentials from MINIO_ACCESS_KEY and MINIO_SECRET_ACCESS_KEY environment variables.
Alternatively you can use XVC_STORAGE_ACCESS_KEY_ID_<storage_name> and
XVC_STORAGE_SECRET_ACCESS_KEY_<storage_name> environment variables if you have multiple storages of this type.
Fields
DigitalOcean
Add a new Digital Ocean storage
Reads credentials from DIGITAL_OCEAN_ACCESS_KEY_ID and DIGITAL_OCEAN_SECRET_ACCESS_KEY environment variables.
Alternatively you can use XVC_STORAGE_ACCESS_KEY_ID_<storage_name> and
XVC_STORAGE_SECRET_ACCESS_KEY_<storage_name> environment variables if you have multiple storages of this type.
Fields
R2
Add a new R2 storage
Reads credentials from R2_ACCESS_KEY_ID and R2_SECRET_ACCESS_KEY environment variables.
Alternatively you can use XVC_STORAGE_ACCESS_KEY_ID_<storage_name> and
XVC_STORAGE_SECRET_ACCESS_KEY_<storage_name> environment variables if you have multiple storages of this type.
Fields
Gcs
Add a new Google Cloud Storage storage
Reads credentials from GCS_ACCESS_KEY_ID and GCS_SECRET_ACCESS_KEY environment variables.
Alternatively you can use XVC_STORAGE_ACCESS_KEY_ID_<storage_name> and
XVC_STORAGE_SECRET_ACCESS_KEY_<storage_name> environment variables if you have multiple storages of this type.
Fields
Wasabi
Add a new Wasabi storage
Reads credentials from WASABI_ACCESS_KEY_ID and WASABI_SECRET_ACCESS_KEY environment variables.
Alternatively you can use XVC_STORAGE_ACCESS_KEY_ID_<storage_name> and
XVC_STORAGE_SECRET_ACCESS_KEY_<storage_name> environment variables if you have multiple storages of this type.
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 subcommandAuto Trait Implementations§
impl Freeze for StorageNewSubCommand
impl RefUnwindSafe for StorageNewSubCommand
impl Send for StorageNewSubCommand
impl Sync for StorageNewSubCommand
impl Unpin for StorageNewSubCommand
impl UnwindSafe for StorageNewSubCommand
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more