kubernetes/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go

type UnstructuredConverter

type structField

type fieldInfo

type fieldsCacheMap

type fieldsCache

func newFieldsCache() *fieldsCache {}

var mapStringInterfaceType

var stringType

var fieldCache

var DefaultUnstructuredConverter

func parseBool(key string) bool {}

type unstructuredConverter

// NewTestUnstructuredConverter creates an UnstructuredConverter that accepts JSON typed maps and translates them
// to Go types via reflection. It performs mismatch detection automatically and is intended for use by external
// test tools. Use DefaultUnstructuredConverter if you do not explicitly need mismatch detection.
func NewTestUnstructuredConverter(comparison conversion.Equalities) UnstructuredConverter {}

// NewTestUnstrucutredConverterWithValidation allows for access to
// FromUnstructuredWithValidation from within tests.
func NewTestUnstructuredConverterWithValidation(comparison conversion.Equalities) *unstructuredConverter {}

type fromUnstructuredContext

// pushMatchedKeyTracker adds a placeholder set for tracking
// matched keys for the given level. This should only be
// called from `structFromUnstructured`.
func (c *fromUnstructuredContext) pushMatchedKeyTracker() {}

// recordMatchedKey initializes the last element of matchedKeys
// (if needed) and sets 'key'. This should only be called from
// `structFromUnstructured`.
func (c *fromUnstructuredContext) recordMatchedKey(key string) {}

// popAndVerifyMatchedKeys pops the last element of matchedKeys,
// checks the matched keys against the data, and adds unknown
// field errors for any matched keys.
// `mapValue` is the value of sv containing all of the keys that exist at this level
// (ie. sv.MapKeys) in the source data.
// `matchedKeys` are all the keys found for that level in the destination object.
// This should only be called from `structFromUnstructured`.
func (c *fromUnstructuredContext) popAndVerifyMatchedKeys(mapValue reflect.Value) {}

func (c *fromUnstructuredContext) recordUnknownField(field string) {}

func (c *fromUnstructuredContext) pushIndex(index int) {}

func (c *fromUnstructuredContext) pushKey(key string) {}

// FromUnstructuredWithValidation converts an object from map[string]interface{} representation into a concrete type.
// It uses encoding/json/Unmarshaler if object implements it or reflection if not.
// It takes a validationDirective that indicates how to behave when it encounters unknown fields.
func (c *unstructuredConverter) FromUnstructuredWithValidation(u map[string]interface{}

// FromUnstructured converts an object from map[string]interface{} representation into a concrete type.
// It uses encoding/json/Unmarshaler if object implements it or reflection if not.
func (c *unstructuredConverter) FromUnstructured(u map[string]interface{}

func fromUnstructuredViaJSON(u map[string]interface{}

func fromUnstructured(sv, dv reflect.Value, ctx *fromUnstructuredContext) error {}

func fieldInfoFromField(structType reflect.Type, field int) *fieldInfo {}

func unwrapInterface(v reflect.Value) reflect.Value {}

func mapFromUnstructured(sv, dv reflect.Value, ctx *fromUnstructuredContext) error {}

func sliceFromUnstructured(sv, dv reflect.Value, ctx *fromUnstructuredContext) error {}

func pointerFromUnstructured(sv, dv reflect.Value, ctx *fromUnstructuredContext) error {}

func structFromUnstructured(sv, dv reflect.Value, ctx *fromUnstructuredContext) error {}

func interfaceFromUnstructured(sv, dv reflect.Value) error {}

// ToUnstructured converts an object into map[string]interface{} representation.
// It uses encoding/json/Marshaler if object implements it or reflection if not.
func (c *unstructuredConverter) ToUnstructured(obj interface{}

// DeepCopyJSON deep copies the passed value, assuming it is a valid JSON representation i.e. only contains
// types produced by json.Unmarshal() and also int64.
// bool, int64, float64, string, []interface{}, map[string]interface{}, json.Number and nil
func DeepCopyJSON(x map[string]interface{}

// DeepCopyJSONValue deep copies the passed value, assuming it is a valid JSON representation i.e. only contains
// types produced by json.Unmarshal() and also int64.
// bool, int64, float64, string, []interface{}, map[string]interface{}, json.Number and nil
func DeepCopyJSONValue(x interface{}

func toUnstructuredViaJSON(obj interface{}

func toUnstructured(sv, dv reflect.Value) error {}

func mapToUnstructured(sv, dv reflect.Value) error {}

func sliceToUnstructured(sv, dv reflect.Value) error {}

func pointerToUnstructured(sv, dv reflect.Value) error {}

func isZero(v reflect.Value) bool {}

func structToUnstructured(sv, dv reflect.Value) error {}

func interfaceToUnstructured(sv, dv reflect.Value) error {}