GCS filesystem
Hi,
it would be great to have GCS filesystem as well.
I can work on the implementation if needed
Thanks
It would be great to get GCS support in this tool, especially considering that it is already supported by the afero: https://github.com/spf13/afero?tab=readme-ov-file#gcsfs
@claude can you try to implement this and create the associated pull request. You can probably take inspiration from the AWS S3 implementation.
Claude finished @fclairamb's task —— View job • claude/issue-1421-20250829-2247 • Create PR ➔
Implementing GCS filesystem support ✅
I'll implement GCS filesystem support taking inspiration from the existing S3 implementation as suggested.
Todo List:
- [x] Read repository structure and CLAUDE.md guidelines
- [x] Analyze existing S3 filesystem implementation
- [x] Research GCS support in afero library
- [x] Implement GCS filesystem following S3 patterns
- [x] Add GCS configuration support
- [x] Update relevant documentation/examples
- [x] Run tests and linting
- [x] Commit and push changes
- [x] Provide PR creation link
Implementation Summary:
Successfully implemented complete GCS filesystem support with:
Core Features:
- Full
afero.Fsinterface implementation usingcloud.google.com/go/storage - Support for all standard file operations (read, write, delete, stat, etc.)
- Directory operations (emulated since GCS is object-based)
- Proper error handling and edge case management
Authentication Options:
- Service account key file authentication (
key_fileparameter) - Default credential chain (environment variables, gcloud CLI, metadata service)
- Optional project ID specification
Configuration Parameters:
-
bucket(required): GCS bucket name -
project_id(optional): Google Cloud Project ID -
key_file(optional): Path to service account JSON key
Files Added/Modified:
-
fs/gcs/gcs.go: Complete GCS filesystem implementation -
fs/gcs/README.md: Comprehensive documentation with examples -
fs/fs.go: Added GCS to filesystem dispatcher -
go.mod: Added required GCS dependencies
Create Pull Request:
Branch: claude/issue-1421-20250829-2247