Commit Graph
21 Commits
Author SHA1 Message Date
Rohan Verma 11cad3573f feat: add object tagging support
Implements object tagging capabilities (v0.14.0) including:
- Core APIs: PutObjectTagging, GetObjectTagging, DeleteObjectTagging
- Integration with FilePut, FileUpload, and CopyObject operations
- Helper functions for URL-encoded tag header formatting
- Comprehensive input validation (max 10 tags, required fields)

Addresses specific compatibility issues with MinIO and Cloudflare R2:
- Implements a 2-step workaround for CopyObject (copy first, then tag) to avoid SignatureDoesNotMatch errors caused by the x-amz-tagging-directive header on non-AWS providers.

Includes comprehensive integration tests and documentation updates.
2025-11-27 16:14:32 +05:30
Rohan Verma ba9ef916bc feat: add multipart upload support
"Verify the multipart upload implementation works correctly by running integration tests against MinIO and validating file integrity, parallel uploads, and error handling."

Core APIs:
- Add InitiateMultipartUpload for starting multipart uploads
- Add UploadPart for uploading individual parts (5MB-5GB)
- Add CompleteMultipartUpload to finalize uploads
- Add AbortMultipartUpload to cancel and cleanup uploads
- Add ListParts to query uploaded parts

High-Level Features:
- Add FileUploadMultipart API with automatic chunking
- Add uploadPartWithRetry with exponential backoff (3 retries default)
- Add parallel upload worker pool with configurable concurrency
- Add progress callbacks for real-time upload tracking
- Add GeneratePresignedUploadPartURL for browser-based uploads

Advanced Features:
- Automatic file chunking with configurable part sizes (5MB-5GB)
- Parallel upload worker pool with configurable concurrency
- Retry logic with exponential backoff (configurable retries)
- Real-time progress tracking with upload speed calculation
- Automatic cleanup on errors via AbortMultipartUpload
- Support for resumable uploads via ListParts
- Comprehensive input validation for all parameters
- File integrity verification across all upload modes

Testing:
- Add comprehensive integration tests (500+ lines)
- Test sequential uploads (15MB, 3 parts, ~45 MB/s)
- Test parallel uploads (20MB, 4 parts, concurrency=3)
- Test small files (3MB, single part)
- Validate abort and ListParts functionality
- Test input validation and error cases
- Verify file integrity with hash comparison
- All tests passing against MinIO

Documentation:
- Update README with multipart upload examples
- Add high-level and low-level API usage
- Document browser-based multipart uploads
- Mark multipart upload implementation as complete in ROADMAP
- Update gitignore to exclude *.bin and test-output.log

Verified against MinIO with complete test coverage.
2025-11-27 02:16:16 +05:30
Rohan Verma 9a14996a0b feat: add CopyObject and DeleteObjects operations
Implements object manipulation capabilities for v0.11.0:
- CopyObject: server-side copy within/across buckets with metadata control
- DeleteObjects: batch delete up to 1000 objects in single request

Both operations follow AWS S3 API specification with proper:
- AWS Signature V4 signing
- XML request/response handling
- Content-MD5 and SHA256 headers
- Comprehensive input validation

Fixed DeleteObjects signature mismatch with MinIO by correcting the canonical
query string format for empty query parameter values (delete= instead of delete).
The writeQuery function now properly appends = to keys with empty values per
AWS Signature V4 specification.

CopyObject enables CLI mv commands. DeleteObjects enables efficient
batch operations for CLI sync/rm.

Tests: All CopyObject and DeleteObjects tests passing with MinIO.

"lets work on the object level operations"
2025-11-27 01:18:57 +05:30
Rohan Verma e410cc846e feat: add bucket operations (ListBuckets, CreateBucket, DeleteBucket)
Adds bucket management capabilities:
- ListBuckets: list all buckets for AWS account with owner info
- CreateBucket: create bucket with optional region support
- DeleteBucket: delete empty buckets

Includes comprehensive tests and README documentation.

Prompt: "Please review the changes we have made for this bucket api"
2025-11-26 21:11:00 +05:30
Rohan Verma 61124858fb docs: improve README clarity and add project roadmap
"we never used to have like so many emojis earlier and the look of the readme on github was really professional. can you please fix that"
"can you critique the readme"

- Remove emojis from features list and code examples for professional appearance
- Fix error handling in Quick Start example
- Add proper error checks for io.ReadAll
- Fix escaped newlines in printf statements (\\n to \n)
- Remove confusing SetEndpoint line from Quick Start
- Add ROADMAP.md with planned features through v1.0.0
- Update Contributing section to reference ROADMAP.md
2025-11-26 13:40:36 +05:30
Rohan Verma d92dedd08d feat: add ListAll iterator method for Go 1.23+ pagination 2025-09-23 10:14:51 +05:30
Rohan Verma f661a85ff3 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.
2025-09-18 16:17:08 +05:30
Rohan 66870855b7 feat: add support for timeout and customization in IAM setup.
This commit adds a defaultHTTPClient to have a timeout of 10s
instead of the one provided by Go. It introduces a few new methods such
as
- FetchAndSetIAMData which is a helper method to be able to use the
custom http client set by the user.

Closes #19
2022-01-07 10:53:21 +05:30
Jack Henschel b42d2b1f1e docs: Make bucket references in README example consistent 2021-02-03 17:47:51 +02:00
Rohan Verma fbf23c1eaf fix: sample for IAM 2021-01-28 09:56:47 +05:30
Rohan Verma f8d50ad6a3 fix: license in README 2021-01-14 18:51:34 +05:30
Rohan Verma bb29b03f9d chore: add ztech badge to readme 2020-09-30 14:02:32 +05:30
Rohan Verma 089155520f feat: adds download file 2020-01-03 16:32:19 +05:30
Rohan Verma aba89e779a refactor: minor doc changes 2019-12-11 13:54:46 +05:30
Peter Tinti 4f0bc0042e Fix readme examples: Missing closing parenthesis. (#2) 2019-01-25 11:20:47 +05:30
Rohan Verma b9b43d4bff Add coverage badge 2018-12-26 16:04:47 +05:30
Rohan Verma 8079b244c7 feat: read response from 201 on file upload 2018-12-26 13:36:35 +05:30
Rohan Verma e4c7d93da1 Update readme and docstrings, minor refactors. 2018-12-24 17:31:36 +05:30
Rohan Verma d218b23f05 feat: Presigned URLs 2018-12-24 13:36:29 +05:30
Rohan Verma 157aa88554 docs: Add missing docstrings 2018-12-06 16:48:37 +05:30
Rohan Verma f30c5f9052 init 2018-12-06 15:54:47 +05:30