kayleg / cloud-pubsub

Google Cloud PubSub client in rust
MIT License
31 stars 21 forks source link

Allow parsing credentials from string #10

Closed ruseinov closed 4 years ago

ruseinov commented 4 years ago

Fixes #9

ruseinov commented 4 years ago

@kayleg please take a look when you have a chance.

kayleg commented 4 years ago

Thanks for adding this. I like the concept, just not entirely sold on the function name. I feel like the name should be more descriptive without needing to check the argument name (especially since the 2 new functions take the same type), but I can't come up with a better suggestion at the moment.

ruseinov commented 4 years ago

new_with_credentials?

ruseinov commented 4 years ago

Here is a list of options I could come up with: new_with_crdentials new_with_json new_with_json_string from_json

ruseinov commented 4 years ago

I’d vote for from_json actually

ruseinov commented 4 years ago

Ended up with from_string.

kayleg commented 4 years ago

good enough for now