mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +00:00
expose unstructured scheme as codec
This commit is contained in:
parent
ca30f38697
commit
067ecb4b60
@ -26,12 +26,10 @@ import (
|
||||
// UnstructuredJSONScheme is capable of converting JSON data into the Unstructured
|
||||
// type, which can be used for generic access to objects without a predefined scheme.
|
||||
// TODO: move into serializer/json.
|
||||
var UnstructuredJSONScheme Decoder = unstructuredJSONScheme{}
|
||||
var UnstructuredJSONScheme Codec = unstructuredJSONScheme{}
|
||||
|
||||
type unstructuredJSONScheme struct{}
|
||||
|
||||
var _ Codec = unstructuredJSONScheme{}
|
||||
|
||||
func (s unstructuredJSONScheme) Decode(data []byte, _ *unversioned.GroupVersionKind, _ Object) (Object, *unversioned.GroupVersionKind, error) {
|
||||
unstruct := &Unstructured{}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user