diff options
author | Alex <alex@adnab.me> | 2022-06-15 20:20:28 +0200 |
---|---|---|
committer | Alex <alex@adnab.me> | 2022-06-15 20:20:28 +0200 |
commit | 77e3fd6db2c9cd3a10889bd071e95ef839cfbefc (patch) | |
tree | da2c363740505a6aee3821ffec83f2d48169d1d5 /src/api/admin/router.rs | |
parent | d544a0e0e03c9b69b226fb5bba2ce27a7af270ca (diff) | |
download | garage-77e3fd6db2c9cd3a10889bd071e95ef839cfbefc.tar.gz garage-77e3fd6db2c9cd3a10889bd071e95ef839cfbefc.zip |
improve internal item counter mechanisms and implement bucket quotas (#326)
- [x] Refactoring of internal counting API
- [x] Repair procedure for counters (it's an offline procedure!!!)
- [x] New counter for objects in buckets
- [x] Add quotas to buckets struct
- [x] Add CLI to manage bucket quotas
- [x] Add admin API to manage bucket quotas
- [x] Apply quotas by adding checks on put operations
- [x] Proof-read
Co-authored-by: Alex Auvolat <alex@adnab.me>
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/326
Co-authored-by: Alex <alex@adnab.me>
Co-committed-by: Alex <alex@adnab.me>
Diffstat (limited to 'src/api/admin/router.rs')
-rw-r--r-- | src/api/admin/router.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/api/admin/router.rs b/src/api/admin/router.rs index 93639873..3eee8b67 100644 --- a/src/api/admin/router.rs +++ b/src/api/admin/router.rs @@ -48,10 +48,7 @@ pub enum Endpoint { DeleteBucket { id: String, }, - PutBucketWebsite { - id: String, - }, - DeleteBucketWebsite { + UpdateBucket { id: String, }, // Bucket-Key Permissions @@ -113,8 +110,7 @@ impl Endpoint { GET "/v0/bucket" => ListBuckets, POST "/v0/bucket" => CreateBucket, DELETE "/v0/bucket" if id => DeleteBucket (query::id), - PUT "/v0/bucket/website" if id => PutBucketWebsite (query::id), - DELETE "/v0/bucket/website" if id => DeleteBucketWebsite (query::id), + PUT "/v0/bucket" if id => UpdateBucket (query::id), // Bucket-key permissions POST "/v0/bucket/allow" => BucketAllowKey, POST "/v0/bucket/deny" => BucketDenyKey, |