aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3/api_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-08-29 17:44:17 +0200
committerAlex Auvolat <alex@adnab.me>2023-08-29 17:44:17 +0200
commit8041d9a8274619b9a7cb66735ed560bcfba16078 (patch)
treec97d70c5c1520d1d7dc26b0c48c7719707952676 /src/api/s3/api_server.rs
parent0b83e0558e5e3fee5237edac0ae6d9ba304bb073 (diff)
downloadgarage-8041d9a8274619b9a7cb66735ed560bcfba16078.tar.gz
garage-8041d9a8274619b9a7cb66735ed560bcfba16078.zip
s3: add xml structures to serialize/deserialize lifecycle configs
Diffstat (limited to 'src/api/s3/api_server.rs')
-rw-r--r--src/api/s3/api_server.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/api/s3/api_server.rs b/src/api/s3/api_server.rs
index 5e793082..06fef6d5 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;
@@ -362,6 +363,11 @@ impl ApiHandler for S3ApiServer {
handle_put_cors(garage, bucket_id, req, content_sha256).await
}
Endpoint::DeleteBucketCors {} => handle_delete_cors(garage, bucket_id).await,
+ Endpoint::GetBucketLifecycleConfiguration {} => handle_get_lifecycle(&bucket).await,
+ Endpoint::PutBucketLifecycleConfiguration {} => {
+ handle_put_lifecycle(garage, bucket_id, req, content_sha256).await
+ }
+ Endpoint::DeleteBucketLifecycle {} => handle_delete_lifecycle(garage, bucket_id).await,
endpoint => Err(Error::NotImplemented(endpoint.name().to_owned())),
};