aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin/router.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/admin/router.rs')
-rw-r--r--src/api/admin/router.rs28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/api/admin/router.rs b/src/api/admin/router.rs
index 2a5098bf..6961becb 100644
--- a/src/api/admin/router.rs
+++ b/src/api/admin/router.rs
@@ -49,6 +49,25 @@ pub enum Endpoint {
// Bucket-Key Permissions
BucketAllowKey,
BucketDenyKey,
+ // Bucket aliases
+ GlobalAliasBucket {
+ id: String,
+ alias: String,
+ },
+ GlobalUnaliasBucket {
+ id: String,
+ alias: String,
+ },
+ LocalAliasBucket {
+ id: String,
+ access_key_id: String,
+ alias: String,
+ },
+ LocalUnaliasBucket {
+ id: String,
+ access_key_id: String,
+ alias: String,
+ },
}}
impl Endpoint {
@@ -87,6 +106,11 @@ impl Endpoint {
// Bucket-key permissions
POST "/bucket/allow" => BucketAllowKey,
POST "/bucket/deny" => BucketDenyKey,
+ // Bucket aliases
+ PUT "/bucket/alias/global" => GlobalAliasBucket (query::id, query::alias),
+ DELETE "/bucket/alias/global" => GlobalUnaliasBucket (query::id, query::alias),
+ PUT "/bucket/alias/local" => LocalAliasBucket (query::id, query::access_key_id, query::alias),
+ DELETE "/bucket/alias/local" => LocalUnaliasBucket (query::id, query::access_key_id, query::alias),
]);
if let Some(message) = query.nonempty_message() {
@@ -107,5 +131,7 @@ impl Endpoint {
generateQueryParameters! {
"id" => id,
"search" => search,
- "globalAlias" => global_alias
+ "globalAlias" => global_alias,
+ "alias" => alias,
+ "accessKeyId" => access_key_id
}