Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

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
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant