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

Deserialize Bucket retention policy from String to u64 #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amuhle
Copy link

@amuhle amuhle commented Apr 23, 2022

Currently when a bucket has retention policy enabled and we try to get the bucket it fails when deserializing it.
Google Storage API is sending a String when a u64 is expected based on their documentation.

This PR creates a specific deserializer for u64 when a String or 64 is being sent.
I tried to find an existing crate which already solves this but couldn't find anything.
However, as this is pretty simple to solve I thought I would just add the code in a new module and if in the future there's a well maintained crate to solve this kind of issues, then it will be pretty straightforward to refactor.

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

Successfully merging this pull request may close these issues.

1 participant