aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli/structs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/garage/cli/structs.rs')
-rw-r--r--src/garage/cli/structs.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs
index b2b5375d..590be1c0 100644
--- a/src/garage/cli/structs.rs
+++ b/src/garage/cli/structs.rs
@@ -150,6 +150,14 @@ pub enum BucketOperation {
#[structopt(name = "delete")]
Delete(DeleteBucketOpt),
+ /// Alias bucket under new name
+ #[structopt(name = "alias")]
+ Alias(AliasBucketOpt),
+
+ /// Remove bucket alias
+ #[structopt(name = "unalias")]
+ Unalias(UnaliasBucketOpt),
+
/// Allow key to read or write to bucket
#[structopt(name = "allow")]
Allow(PermBucketOpt),
@@ -194,6 +202,29 @@ pub struct DeleteBucketOpt {
}
#[derive(Serialize, Deserialize, StructOpt, Debug)]
+pub struct AliasBucketOpt {
+ /// Existing bucket name (its alias in global namespace or its full hex uuid)
+ pub existing_bucket: String,
+
+ /// New bucket name
+ pub new_name: String,
+
+ /// Make this alias local to the specified access key
+ #[structopt(long = "local")]
+ pub local: Option<String>,
+}
+
+#[derive(Serialize, Deserialize, StructOpt, Debug)]
+pub struct UnaliasBucketOpt {
+ /// Bucket name
+ pub name: String,
+
+ /// Unalias in bucket namespace local to this access key
+ #[structopt(long = "local")]
+ pub local: Option<String>,
+}
+
+#[derive(Serialize, Deserialize, StructOpt, Debug)]
pub struct PermBucketOpt {
/// Access key name or ID
#[structopt(long = "key")]