mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-27 14:45:49 +03:00
[PR #6] [MERGED] Add filesystem backend #261
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#261
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fsouza/fake-gcs-server/pull/6
Author: @gracenoah
Created: 4/13/2018
Status: ✅ Merged
Merged: 4/18/2018
Merged by: @fsouza
Base:
master← Head:add-filesystem-backend📝 Commits (4)
fb3eeb8factor out inmemory storage backendbe9840eimplement filesystem storage backendfbeeaf4clean up and improve error handling52b7b6cstore CRCs unmodified📊 Changes
9 files changed (+537 additions, -66 deletions)
View changed files
📝
fakestorage/bucket.go(+9 -6)📝
fakestorage/object.go(+44 -39)📝
fakestorage/server.go(+55 -17)📝
fakestorage/upload.go(+16 -4)➕
internal/backend/backend_test.go(+136 -0)➕
internal/backend/fs.go(+131 -0)➕
internal/backend/memory.go(+120 -0)➕
internal/backend/object.go(+14 -0)➕
internal/backend/storage.go(+12 -0)📄 Description
This PR adds the ability to persist stored files to disk. This is helpful when using this server in development (as opposed to just in tests). Usage looks like:
This PR is broken up into 3 parts for easy reviewing:
I took special care to make sure I don't break the existing package API, but because some methods didn't have an error return argument, I had to add some panics. I think that's a reasonable tradeoff for now and the errors can be returned when you decide it's okay to break backwards compatibility.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.