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,
        remote_prefix: String,
        bucket_name: String,
        region: String,
    },
    Minio {
        name: String,
        endpoint: String,
        bucket_name: String,
        region: String,
        remote_prefix: String,
    },
    DigitalOcean {
        name: String,
        bucket_name: String,
        region: String,
        remote_prefix: String,
    },
    R2 {
        name: String,
        account_id: String,
        bucket_name: String,
        remote_prefix: String,
    },
    Gcs {
        name: String,
        bucket_name: String,
        region: String,
        remote_prefix: String,
    },
    Wasabi {
        name: String,
        bucket_name: String,
        endpoint: String,
        storage_prefix: String,
    },
}
Expand description

Add new remotes

Variants§

§

Local

Fields

§path: PathBuf

Directory to be set as a remote

§name: String

add a new local remote

§

Generic

Fields

§name: String

Name of the remote

This must be unique among all remotes of the project

§init_command: String

Command to initialize the remote. This command is run once after defining the remote.

You can use {URL} and {DIR} as shortcuts.

§list_command: String

Command to list the files in remote

You can use {URL} and {DIR} placeholders and define values for these with –url and –dir options.

§download_command: String

Command to download a file from remote.

You can use {URL} and {DIR} placeholders and define values for these with –url and –dir options.

§upload_command: String

Command to upload a file to remote.

You can use {URL} and {DIR} placeholders and define values for these with –url and –dir options.

§delete_command: String

The delete command to remove a file from remote You can use {URL} and {DIR} placeholders and define values for these with –url and –dir options.

§max_processes: usize

Number of maximum processes to run simultaneously

§url: Option<String>

You can set a string to replace {URL} placeholder in commands

§storage_dir: Option<String>

You can set a string to replace {DIR} placeholder in commands

add a new generic remote

§

Rsync

Fields

§name: String

Name of the remote

This must be unique among all remotes of the project

§host: String

Hostname for the connection in the form host.example.com (without @, : or protocol)

§port: Option<usize>

Port number for the connection in the form 22. Doesn’t add port number to connection string if not given.

§user: Option<String>

User name for the connection, the part before @ in user@example.com (without @, hostname). User name isn’t included in connection strings if not given.

§storage_dir: String

Remote directory in the host to store the files.

add a new rsync remote

§

S3

Fields

§name: String

Name of the remote

This must be unique among all remotes of the project

§remote_prefix: String

You can set a directory in the bucket with this prefix

§bucket_name: String

S3 bucket name

§region: String

AWS region

Add a new S3 remote

§

Minio

Fields

§name: String

Name of the remote

This must be unique among all remotes of the project

§endpoint: String

Minio server url in the form https://myserver.example.com:9090

§bucket_name: String

Bucket name

§region: String

Region of the server

§remote_prefix: String

You can set a directory in the bucket with this prefix

Add a new Minio remote

§

DigitalOcean

Fields

§name: String

Name of the remote

This must be unique among all remotes of the project

§bucket_name: String

Bucket name

§region: String

Region of the server

§remote_prefix: String

You can set a directory in the bucket with this prefix

Add a new Digital Ocean remote

§

R2

Fields

§name: String

Name of the remote

This must be unique among all remotes of the project

§account_id: String

R2 account ID

§bucket_name: String

Bucket name

§remote_prefix: String

You can set a directory in the bucket with this prefix

Add a new R2 remote

§

Gcs

Fields

§name: String

Name of the remote

This must be unique among all remotes of the project

§bucket_name: String

Bucket name

§region: String

Region of the server, e.g., europe-west3

§remote_prefix: String

You can set a directory in the bucket with this prefix

Add a new Google Cloud Storage remote

§

Wasabi

Fields

§name: String

Name of the remote

This must be unique among all remotes of the project

§bucket_name: String

Bucket name

§endpoint: String

Endpoint for the server, complete with the region if there is

e.g. for eu-central-1 region, use s3.eu-central-1.wasabisys.com as the endpoint.

§storage_prefix: String

You can set a directory in the bucket with this prefix

Add a new Wasabi remote

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Assign values from ArgMatches to self.
Assign values from ArgMatches to self.
Append to Command so it can instantiate Self. Read more
Append to Command so it can update self. Read more
Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more