Commit Graph

14 Commits

Author SHA1 Message Date
Wojciech Tyczynski
218d3e5923 Rename RawJSON to Raw in runtime.Unknown and add ContentType & ContentEncoding. 2016-03-16 16:43:58 +01:00
Kris
4c58302b5b Adding dynamic client 2016-02-12 11:49:00 -08:00
deads2k
067ecb4b60 expose unstructured scheme as codec 2016-02-04 11:14:16 -05:00
Clayton Coleman
60b66665e1 Move conversion.Scheme to runtime
There is only one type registry to rule them all
2016-01-30 14:12:40 -05:00
Clayton Coleman
63a7a41ddf Simplify Codec and split responsibilities
Break Codec into two general purpose interfaces, Encoder and Decoder,
and move parameter codec responsibilities to ParameterCodec.

Make unversioned types explicit when registering - these types go
through conversion without modification.

Switch to use "__internal" instead of "" to represent the internal
version. Future commits will also add group defaulting (so that "" is
expanded internally into a known group version, and only cleared during
set).

For embedded types like runtime.Object -> runtime.RawExtension, put the
responsibility on the caller of Decode/Encode to handle transformation
into destination serialization. Future commits will expand RawExtension
and Unknown to accept a content encoding as well as bytes.

Make Unknown a bit more powerful and use it to carry unrecognized types.
2016-01-21 23:18:32 -05:00
Clayton Coleman
1e21054134 Hide common codec methods under helpers
The pending codec -> conversion split changes the signature of
Encode and Decode to be more complicated. Create a stub helper
with the exact semantics of today and do the simple mechanical
refactor here to reduce the cost of that change.
2015-12-09 21:15:02 -05:00
deads2k
f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
deads2k
6231404682 update decoder to use GroupVersion 2015-11-25 12:14:06 -05:00
Wojciech Tyczynski
d7b098b0e9 Add DecodeParametersInto method to Codec. 2015-11-18 09:56:04 +01:00
Kris Rousey
6e64a63a84 Adding a way to decode to a specified version.
This is largely needed as a way to get a versioned client without
requiring everyone to switch to versioned types at once.
2015-08-07 14:16:24 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Chao Xu
664d20c572 Add DecodeIntoWithSpecifiedVersionKind() to Decoder interface.
The function validate/default the body with the passed in apiVersion and Kind.
It's called in createHandler and UpdateResource
2015-08-03 15:30:00 -07:00
Eric Paris
6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Clayton Coleman
12ba4e2452 Do not automatically decode runtime.RawExtension
Make clients opt in to decoding objects that are stored
in the generic api.List object by invoking runtime.DecodeList()
with a set of schemes. Makes it easier to handle unknown
schema objects because decoding is in the control of the code.

Add runtime.Unstructured, which is a simple in memory
representation of an external object.
2015-04-29 12:53:07 -04:00