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

Factor common object serialization and deserialization logic out of IObject implementations #55

Closed
exarkun opened this issue Feb 1, 2017 · 0 comments

Comments

@exarkun
Copy link
Contributor

exarkun commented Feb 1, 2017

All Kubernetes objects have a kind and apiVersion. Also, these values are fixed per-type (since they basically tell you what the type is). These fields (currently) need special handling in from_raw and to_raw and the handling is essentially the same across all types.

So, instead of making every type duplicate this logic, introduce some APIs that operate on IObject providers and apply this logic.

Something along the lines of object_from_raw(object_to_raw(any_iobject)) == any_iobject.

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