feat: implement Simple List API for S3 objects
- Add List method with ListInput and ListResponse structs following simples3 patterns
- Implement pagination, prefix filtering, and delimiter grouping
- Add comprehensive test suite for List functionality
- Update tests to use environment variables instead of hardcoded values
- Fix deprecated io/ioutil usage throughout codebase
- Add comprehensive README with API documentation and examples
- Add Nix development environment with flake.nix
- Add Justfile for modern command runner
- Add Docker Compose setup for local MinIO testing
- Update GitHub Actions to use Nix and Justfile for CI consistency
- Fix test naming and setup flow issues
New API:
s3.List(ListInput{
Bucket: "my-bucket",
Prefix: "documents/",
MaxKeys: 100,
})
All tests pass with new simplified API design.
This commit is contained in:
@@ -152,7 +152,7 @@ func buildUploadSign(nowTime time.Time, credential string, uploadConfig UploadCo
|
||||
})
|
||||
}
|
||||
|
||||
func (s3 S3) buildCredential(nowTime time.Time) []byte {
|
||||
func (s3 *S3) buildCredential(nowTime time.Time) []byte {
|
||||
var b bytes.Buffer
|
||||
b.WriteString(s3.AccessKey)
|
||||
b.WriteRune('/')
|
||||
@@ -166,7 +166,7 @@ func (s3 S3) buildCredential(nowTime time.Time) []byte {
|
||||
return b.Bytes()
|
||||
}
|
||||
|
||||
func (s3 S3) buildCredentialWithoutKey(nowTime time.Time) []byte {
|
||||
func (s3 *S3) buildCredentialWithoutKey(nowTime time.Time) []byte {
|
||||
var b bytes.Buffer
|
||||
b.WriteString(nowTime.Format(shortTimeFormat))
|
||||
b.WriteRune('/')
|
||||
|
||||
Reference in New Issue
Block a user