diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-15 14:59:23 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-15 14:59:23 +0200 |
commit | e876bdd6632e0f00e2973cfba5336128ef00a3ab (patch) | |
tree | 100ea4df7f1d0e6bb5b6efa96ba9de5b3d0a9c56 | |
parent | f8f417906ad9026cdf2ae6ac18a918cd4069312a (diff) | |
download | guichet-e876bdd6632e0f00e2973cfba5336128ef00a3ab.tar.gz guichet-e876bdd6632e0f00e2973cfba5336128ef00a3ab.zip |
spec
-rw-r--r-- | api.go | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -118,6 +118,35 @@ func handleAPIGarageBucket(w http.ResponseWriter, r *http.Request) { return } + // CHECK PATCH REQUEST + + // READ BODY JSON + + // VALIDATE OBJECT + // --- bucket query parameter --- + // 1. bucket must be owned by the key with owner permission, otherwise throw "unauthorized" (401) + // 2. must not end with deuxfleurs.fr or deuxfleurs.org, otherwise throw "forbidden" (403) + // --- global --- + // 1. can be true, false, or nil (use pointers) + // 2. if nil do nothing + // 3. if false, throw "not yet implemented" (501) + // 4. if true, check that the bucket name does not exist yet in the global namespace, throw "forbidden" (403) + // --- quota.size --- + // 1. if no quota on the bucket + this field is none, set to 50MB + // 2. if lower than 50MB, set to 50MB. If higher than 200MB, set to 200MB + // --- quota.files --- + // 1. if no quota on the bucket + this field is none, set to 10k + // 2. if lower than 10k, set to 10k. If higher than 40k, set to 40k + + // IF BODY.GLOBAL is not NONE + // Add an alias + + // IF BODY.QUOTA.SIZE is not NONE + // Change quota + + // IF BODY.QUOTA.FILE is not NONE + // Change quota + log.Println(login, s3key) return |