27 lines
1.0 KiB
Markdown
27 lines
1.0 KiB
Markdown
# POST3-008: Client SDK crate
|
|
|
|
**Status:** Done
|
|
**Priority:** P0
|
|
**Blocked by:** —
|
|
|
|
## Description
|
|
|
|
Create a `crates/post3-sdk/` client crate that wraps `aws-sdk-s3` with post3-specific defaults.
|
|
|
|
## What was built
|
|
|
|
- [x] `crates/post3-sdk/Cargo.toml` — depends on aws-sdk-s3, aws-credential-types, aws-types, aws-config
|
|
- [x] `Post3Client` struct wrapping `aws_sdk_s3::Client`
|
|
- [x] `Post3Client::new(endpoint_url)` — builds client with force_path_style, dummy creds, us-east-1
|
|
- [x] `Post3Client::builder()` — for advanced config (custom creds, region, etc.)
|
|
- [x] Re-exports: `aws_sdk_s3` and `bytes`
|
|
- [x] Convenience methods:
|
|
- `create_bucket(name)`, `head_bucket(name)`, `delete_bucket(name)`, `list_buckets()`
|
|
- `put_object(bucket, key, body: impl AsRef<[u8]>)`
|
|
- `get_object(bucket, key)` → `Result<Bytes>`
|
|
- `head_object(bucket, key)` → `Result<Option<ObjectInfo>>`
|
|
- `delete_object(bucket, key)`
|
|
- `list_objects(bucket, prefix)` → `Result<Vec<ObjectInfo>>`
|
|
- [x] `inner()` access to `aws_sdk_s3::Client`
|
|
- [x] Unit tests + doc-tests pass
|