- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for NewYAMLOrJSONDecoder (0.25 sec)
-
staging/src/k8s.io/apiserver/pkg/cel/common/equality_test.go
func mustSchema(source string) *openapi.Schema { d := yaml.NewYAMLOrJSONDecoder(strings.NewReader(source), 4096) res := &spec.Schema{} if err := d.Decode(res); err != nil { panic(err) } return &openapi.Schema{Schema: res} } // Creates an *unstructured by decoding the given YAML. Panics on error func mustUnstructured(source string) interface{} { d := yaml.NewYAMLOrJSONDecoder(strings.NewReader(source), 4096) var res interface{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 13 21:36:46 UTC 2023 - 21.1K bytes - Viewed (0) -
pilot/pkg/config/kube/crd/conversion.go
var others []IstioKind reader := bytes.NewReader([]byte(inputs)) empty := IstioKind{} // We store configs as a YaML stream; there may be more than one decoder. yamlDecoder := kubeyaml.NewYAMLOrJSONDecoder(reader, 512*1024) for { obj := IstioKind{} err := yamlDecoder.Decode(&obj) if err == io.EOF { break } if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 25 18:26:16 UTC 2024 - 6.3K bytes - Viewed (0) -
pkg/config/crd/validator.go
data, err := os.Open(file) if err != nil { return nil, fmt.Errorf("failed to read input yaml file: %v", err) } closers = append(closers, data) yamlDecoder := kubeyaml.NewYAMLOrJSONDecoder(data, 512*1024) for { un := &unstructured.Unstructured{} err = yamlDecoder.Decode(&un) if err == io.EOF { break } if err != nil { return nil, err }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 17 15:38:40 UTC 2023 - 8.3K bytes - Viewed (0) -
pkg/kube/inject/webhook_test.go
for _, object := range strings.Split(mlist, yamlSeparator) { if len(object) == 0 { continue } r := bytes.NewReader([]byte(object)) decoder := k8syaml.NewYAMLOrJSONDecoder(r, 1024) out := &unstructured.Unstructured{} err := decoder.Decode(out) if err != nil { t.Fatalf("error decoding object %q: %v", object, err) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 17 20:25:52 UTC 2023 - 39K bytes - Viewed (1) -
staging/src/k8s.io/apiextensions-apiserver/test/integration/ratcheting_test.go
patch := &unstructured.Unstructured{} if obj, ok := a.patch.(map[string]interface{}); ok { patch.Object = obj } else if str, ok := a.patch.(string); ok { str = FixTabsOrDie(str) if err := utilyaml.NewYAMLOrJSONDecoder(strings.NewReader(str), len(str)).Decode(&patch.Object); err != nil { return err } } else { return fmt.Errorf("invalid patch type: %T", a.patch) } patch.SetKind(kind)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 59.5K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go
} // Creates a *spec.Schema Schema by decoding the given YAML. Panics on error func mustSchema(source string) *schema.Structural { source = FixTabsOrDie(source) d := yaml.NewYAMLOrJSONDecoder(strings.NewReader(source), 4096) props := &apiextensions.JSONSchemaProps{} if err := d.Decode(props); err != nil { panic(err) } convertedProps := &apiextensionsinternal.JSONSchemaProps{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 17:14:10 UTC 2024 - 159.9K bytes - Viewed (0)