ThouCheese / cloud-storage-rs

A crate for uploading files to Google cloud storage, and for generating download urls.
MIT License
122 stars 88 forks source link

Make env-config side-effects optional #86

Open ajpauwels opened 3 years ago

ajpauwels commented 3 years ago

Currently, this library sources credentials for performing operations exclusively from env. Although this is convenient most of the time, it introduces two problems:

As it stands, the library config is self-contained within the ServiceAccount struct after loading from env. Allowing for optional passing in of this struct on creation of the client should solve this issue. All downstream code would need to be updated to use this optional config over the globally-defined crate::SERVICE_ACCOUNT however.

ThouCheese commented 3 years ago

I believe that #73 would go a long way in resolving this, which I am hoping to merge soon. Is there something more you have in mind that what is being offered there?