ftpserver icon indicating copy to clipboard operation
ftpserver copied to clipboard

GCS filesystem

Open FedeBev opened this issue 1 year ago • 1 comments

Hi,

it would be great to have GCS filesystem as well.

I can work on the implementation if needed

Thanks

FedeBev avatar Sep 05 '24 13:09 FedeBev

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

vsychov avatar Sep 23 '24 17:09 vsychov

@claude can you try to implement this and create the associated pull request. You can probably take inspiration from the AWS S3 implementation.

fclairamb avatar Aug 29 '25 22:08 fclairamb

Claude finished @fclairamb's task —— View jobclaude/issue-1421-20250829-2247Create 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.Fs interface implementation using cloud.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_file parameter)
  • 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

claude[bot] avatar Aug 29 '25 22:08 claude[bot]