fullstorydev / fullstorydev/emulators

Support additional XML API endpoints

Open
#51 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
157
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Hi Full Story Dev,

From scouring the interwebs, it's my opinion that this is the highest quality open source GCS emulator available today. Thank you!!

### My Goal
For one of my projects, I've leveraging the `https://github.com/ncruces/go-gcp/gmutex` package to do some distributed locking. I'd love to be able to run integration tests against the gcsemu cli to avoid needing credentials and improve test execution time.

### My Problem
However, that package relies on the following Google Cloud Storage XML API endpoints which are not available in this project yet:
* [HEAD Object](https://cloud.google.com/storage/docs/xml-api/head-object)
* Simple [PUT Object](https://cloud.google.com/storage/docs/xml-api/put-object-upload)
* Compose [PUT Object](https://cloud.google.com/storage/docs/xml-api/put-object-compose)

### Proposed Solution
Would you be willing to accept a contribution that added support for these endpoints? I've been hacking on a fork and making some progress.

Since the XML API has some differences in how conditions are passed to the server via query params and a different path structure, I'd probably:
* rename the existing `g.Handler()` -> `g.JsonHandler()` for these routes: https://github.com/fullstorydev/emulators/blob/master/storage/gcsemu/parse.go#L9-L14
* add a new `g.XmlHandler()` for these routes: https://github.com/fullstorydev/emulators/blob/master/storage/gcsemu/parse.go#L16

I'd probably use the test suite for this project and from `gmutex` and examining the docs to validate I've implemented the behavior correctly.

----

I understand this is a big ask, and I completely understand if you'd rather decline a contribution of this nature. Let me know if you're willing to consider and discuss. Many thanks for all the excellent work on this project to date!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.