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
- Simple PUT Object
- Compose PUT Object
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!