- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for toUnstructured (0.32 sec)
-
pkg/api/testing/applyconfiguration_test.go
} } }) } } func unstructuredRoundTripApplyConfiguration(t *testing.T, item runtime.Object, applyConfig interface{}) { u, err := runtime.DefaultUnstructuredConverter.ToUnstructured(item) if err != nil { t.Errorf("ToUnstructured failed: %v", err) return } err = runtime.DefaultUnstructuredConverter.FromUnstructured(u, applyConfig) if err != nil { t.Errorf("FromUnstructured failed: %v", err) return
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 05 20:12:50 UTC 2022 - 7.3K bytes - Viewed (0) -
pkg/api/testing/unstructured_test.go
t.Errorf("Object changed during JSON operations, diff: %v", cmp.Diff(item, unmarshalledObj)) return } newUnstr, err := runtime.DefaultUnstructuredConverter.ToUnstructured(item) if err != nil { t.Errorf("ToUnstructured failed: %v", err) return } newObj := reflect.New(reflect.TypeOf(item).Elem()).Interface().(runtime.Object)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 16.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/converter.go
return nil, fmt.Errorf("ToUnstructured requires a non-nil pointer to an object, got %v", t) } u = map[string]interface{}{} err = toUnstructured(value.Elem(), reflect.ValueOf(&u).Elem()) } if c.mismatchDetection { newUnstr := map[string]interface{}{} newErr := toUnstructuredViaJSON(obj, &newUnstr) if (err != nil) != (newErr != nil) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 16:02:13 UTC 2023 - 24.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go
} // MarshalJSON implements the json.Marshaler interface. func (d Duration) MarshalJSON() ([]byte, error) { return json.Marshal(d.Duration.String()) } // ToUnstructured implements the value.UnstructuredConverter interface. func (d Duration) ToUnstructured() interface{} { return d.Duration.String() } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. //
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Feb 08 00:11:06 UTC 2020 - 1.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/bench_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 8.9K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/serviceimportcache_test.go
Namespace: serviceImportNamespace, }, Spec: mcsapi.ServiceImportSpec{ Type: importType, IPs: vips, }, } return toUnstructured(si) } func toUnstructured(o any) *unstructured.Unstructured { u, err := runtime.DefaultUnstructuredConverter.ToUnstructured(o) if err != nil { panic(err) } return &unstructured.Unstructured{Object: u}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Aug 14 18:50:38 UTC 2023 - 15.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 16:02:13 UTC 2023 - 22.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/dispatcher.go
return errors.New("UnmarshalJSON unimplemented for wrappedParam") } func (w *wrappedParam) ToUnstructured() interface{} { res, err := runtime.DefaultUnstructuredConverter.ToUnstructured(w.nested) if err != nil { return nil } metaRes, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&w.TypeMeta) if err != nil { return nil } for k, v := range metaRes { res[k] = v }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 14.4K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta/coerce_test.go
} } N := 100 for i := 0; i < N; i++ { fuzzedObjectMeta := &metav1.ObjectMeta{} fuzzer.Fuzz(fuzzedObjectMeta) goodMetaMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(fuzzedObjectMeta.DeepCopy()) if err != nil { t.Fatal(err) } for _, pth := range jsonPaths(nil, goodMetaMap) { for _, v := range spuriousValues() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 12.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
func (t Time) MarshalCBOR() ([]byte, error) { if t.IsZero() { return cbor.Marshal(nil) } return cbor.Marshal(t.UTC().Format(time.RFC3339)) } // ToUnstructured implements the value.UnstructuredConverter interface. func (t Time) ToUnstructured() interface{} { if t.IsZero() { return nil } buf := make([]byte, 0, len(time.RFC3339)) buf = t.UTC().AppendFormat(buf, time.RFC3339) return string(buf) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 5.2K bytes - Viewed (0)