- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for SetUnstructuredContent (0.23 sec)
-
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/internal/generic/controller_test.go
object1 := &unstructured.Unstructured{} object1.SetUnstructuredContent(map[string]interface{}{ "metadata": map[string]interface{}{ "name": "object1", "resourceVersion": "object1", }, }) object1.SetGroupVersionKind(fakeGVK) object1v2 := &unstructured.Unstructured{} object1v2.SetUnstructuredContent(map[string]interface{}{ "metadata": map[string]interface{}{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 12 18:58:24 UTC 2024 - 16.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go
// UnstructuredList's implementation of SetUnstructuredContent // produces different objects than those produced by a decode using // UnstructuredJSONScheme: // // 1. SetUnstructuredContent retains the "items" key in the list's // Object field. It is omitted from Object when decoding with // UnstructuredJSONScheme. // 2. SetUnstructuredContent does not populate "apiVersion" and
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 9.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go
items[i] = item.UnstructuredContent() } out["items"] = items return out } // SetUnstructuredContent obeys the conventions of List and keeps Items and the items // array in sync. If items is not an array of objects in the incoming map, then any // mismatched item will be removed. func (obj *UnstructuredList) SetUnstructuredContent(content map[string]interface{}) { obj.Object = content if content == nil { obj.Items = nil
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun May 28 04:46:35 UTC 2023 - 6.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go
// []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to // and from JSON. SetUnstructuredContent should be used to mutate the contents. UnstructuredContent() map[string]interface{} // SetUnstructuredContent updates the object content to match the provided map. SetUnstructuredContent(map[string]interface{})
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun May 28 03:26:35 UTC 2023 - 19K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/converter.go
if err != nil { return err } unstructuredConverted, ok := converted.(runtime.Unstructured) if !ok { // this should not happened return fmt.Errorf("CR conversion failed") } unstructOut.SetUnstructuredContent(unstructuredConverted.UnstructuredContent()) return nil } // ConvertToVersion converts in object to the given gvk in place and returns the same `in` object.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 19:06:46 UTC 2024 - 9.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/scheme.go
case okIn && okOut: // converting unstructured input to an unstructured output is a straight copy - unstructured // is a "smart holder" and the contents are passed by reference between the two objects unstructuredOut.SetUnstructuredContent(unstructuredIn.UnstructuredContent()) return nil case okOut: // if the output is an unstructured object, use the standard Go type to unstructured // conversion. The object must not be internal.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 18 04:27:38 UTC 2022 - 25.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/testing/types.go
} func (obj *Unstructured) UnstructuredContent() map[string]interface{} { if obj.Object == nil { return make(map[string]interface{}) } return obj.Object } func (obj *Unstructured) SetUnstructuredContent(content map[string]interface{}) { obj.Object = content } // MarshalJSON ensures that the unstructured object produces proper // JSON when passed to Go's standard JSON library.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun May 28 03:26:35 UTC 2023 - 11.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go
// to, so in order to detect strict JSON errors we need // to unmarshal directly into the object. m := map[string]interface{}{} strictJSONErrs, err = kjson.UnmarshalStrict(data, &m) u.SetUnstructuredContent(m) } else { strictJSONErrs, err = kjson.UnmarshalStrict(data, into) } if err != nil { // fatal decoding error, not due to strictness return nil, err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 25 16:08:07 UTC 2022 - 12K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
} func (obj *Unstructured) UnstructuredContent() map[string]interface{} { if obj.Object == nil { return make(map[string]interface{}) } return obj.Object } func (obj *Unstructured) SetUnstructuredContent(content map[string]interface{}) { obj.Object = content } // MarshalJSON ensures that the unstructured object produces proper // JSON when passed to Go's standard JSON library.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun May 28 03:26:35 UTC 2023 - 13.7K bytes - Viewed (0)