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

add Hydrate method and Hydratable interface for Href field handling #269

Open
displague opened this issue Apr 20, 2021 · 0 comments
Open

Comments

@displague
Copy link
Member

I'm considering adding a Hydrate method to all of our types (or ServiceOps) which could be used as a Hydratable interface and would allow for objects with only an Href to have their Href parsed and have Get called on the object. Each type may also need an Href getter to implement this, I'm not sure yet.

This would likely result in a refactor of Get to rely on Hydration.

obj.Hydrate() could also be used to refresh an existing object, which is something that we do sometimes in integrations. Hydrate might need to take include/exclude parameters, and define the default inclusion parameters for each object type.

Our types don't have client references, and should not need to care about clients. The Hydrate method would likely be a part of the FooServiceOp type.

This may just be a bad idea 😄

Originally posted by @displague in #242 (comment)

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

1 participant