diff options
author | Alex <alex@adnab.me> | 2023-09-04 09:45:10 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-09-04 09:45:10 +0000 |
commit | 3f461d889143c5f6edf64ff9649647d944a2ab17 (patch) | |
tree | a2351a3eceaf4ab94dbae783f3f7e5855cc5b747 /src/api/s3/api_server.rs | |
parent | 2e90e1c124ea298de5e613de5a672f7c90ab6704 (diff) | |
parent | 8e0c020bb95a05ea657fa75cf19f8e125d9c602d (diff) | |
download | garage-3f461d889143c5f6edf64ff9649647d944a2ab17.tar.gz garage-3f461d889143c5f6edf64ff9649647d944a2ab17.zip |
Merge pull request 'object lifecycles (fix #309)' (#620) from bucket-lifecycle into next
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/620
Diffstat (limited to 'src/api/s3/api_server.rs')
-rw-r--r-- | src/api/s3/api_server.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/api/s3/api_server.rs b/src/api/s3/api_server.rs index 5e793082..3f995d34 100644 --- a/src/api/s3/api_server.rs +++ b/src/api/s3/api_server.rs @@ -26,6 +26,7 @@ use crate::s3::copy::*; use crate::s3::cors::*; use crate::s3::delete::*; use crate::s3::get::*; +use crate::s3::lifecycle::*; use crate::s3::list::*; use crate::s3::multipart::*; use crate::s3::post_object::handle_post_object; @@ -354,14 +355,21 @@ impl ApiHandler for S3ApiServer { } Endpoint::GetBucketWebsite {} => handle_get_website(&bucket).await, Endpoint::PutBucketWebsite {} => { - handle_put_website(garage, bucket_id, req, content_sha256).await + handle_put_website(garage, bucket.clone(), req, content_sha256).await } - Endpoint::DeleteBucketWebsite {} => handle_delete_website(garage, bucket_id).await, + Endpoint::DeleteBucketWebsite {} => handle_delete_website(garage, bucket.clone()).await, Endpoint::GetBucketCors {} => handle_get_cors(&bucket).await, Endpoint::PutBucketCors {} => { - handle_put_cors(garage, bucket_id, req, content_sha256).await + handle_put_cors(garage, bucket.clone(), req, content_sha256).await + } + Endpoint::DeleteBucketCors {} => handle_delete_cors(garage, bucket.clone()).await, + Endpoint::GetBucketLifecycleConfiguration {} => handle_get_lifecycle(&bucket).await, + Endpoint::PutBucketLifecycleConfiguration {} => { + handle_put_lifecycle(garage, bucket.clone(), req, content_sha256).await + } + Endpoint::DeleteBucketLifecycle {} => { + handle_delete_lifecycle(garage, bucket.clone()).await } - Endpoint::DeleteBucketCors {} => handle_delete_cors(garage, bucket_id).await, endpoint => Err(Error::NotImplemented(endpoint.name().to_owned())), }; |