Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow usage w/ an emulator #96

Open
crepererum opened this issue Dec 17, 2021 · 2 comments
Open

Allow usage w/ an emulator #96

crepererum opened this issue Dec 17, 2021 · 2 comments

Comments

@crepererum
Copy link

It would be nice if cloud-storage would allow users to connect to an emulator like https://github.com/oittaa/gcp-storage-emulator or https://github.com/fsouza/fake-gcs-server for local testing. For this the following behavior changes are required:

  1. Disable auth. Other libs call this AnonymousCredentials, but I think it's just that they don't specify any auth headers at all (ref).
  2. Allow to specify a custom endpoint instead of a hardcoded BASE_URL.
@ThouCheese
Copy link
Owner

Sure this is something that we can do. Do you have a specific API in mind that works well for you? Maybe something like

cloud_storage::Client::new()
    .disable_auth()
    .base_url("whatever")
    // rest of your behaviour

Would that work/be convenient?

@crepererum
Copy link
Author

The proposed API looks perfect. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants