feat: add post3 s3 proxy for postgresql

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-02-27 11:37:48 +01:00
commit 21bac4a33f
67 changed files with 14403 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
# POST3-006: S3 bucket and object handlers
**Status:** Done
**Priority:** P1
**Blocked by:** POST3-005
## Description
Implement all S3 HTTP request handlers that bridge the S3 REST API to the core Store API.
## Acceptance Criteria
### Bucket handlers (`s3/handlers/buckets.rs`)
- [ ] CreateBucket — PUT /{bucket} → 200 + Location header
- [ ] HeadBucket — HEAD /{bucket} → 200 or 404
- [ ] DeleteBucket — DELETE /{bucket} → 204 (409 if not empty)
- [ ] ListBuckets — GET / → 200 + XML
### Object handlers (`s3/handlers/objects.rs`)
- [ ] PutObject — PUT /{bucket}/{*key} → 200 + ETag header; reads x-amz-meta-* from request headers
- [ ] GetObject — GET /{bucket}/{*key} → 200 + body + ETag + Content-Type + Content-Length + Last-Modified + x-amz-meta-* headers
- [ ] HeadObject — HEAD /{bucket}/{*key} → 200 + metadata headers (no body)
- [ ] DeleteObject — DELETE /{bucket}/{*key} → 204
- [ ] ListObjectsV2 — GET /{bucket}?list-type=2 → 200 + XML
### Error handling
- [ ] NoSuchBucket → 404 + XML error
- [ ] NoSuchKey → 404 + XML error
- [ ] BucketAlreadyOwnedByYou → 409 + XML error
- [ ] BucketNotEmpty → 409 + XML error