Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for strictDecodingError (0.18 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/error.go

    	_, ok := err.(*missingVersionErr)
    	return ok
    }
    
    // strictDecodingError is a base error type that is returned by a strict Decoder such
    // as UniversalStrictDecoder.
    type strictDecodingError struct {
    	errors []error
    }
    
    // NewStrictDecodingError creates a new strictDecodingError object.
    func NewStrictDecodingError(errors []error) error {
    	return &strictDecodingError{
    		errors: errors,
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 19 21:24:36 UTC 2021
    - 4.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go

    	_, _, err := strictCodec.Decode([]byte(duplicateKeys), nil, nil)
    	if !runtime.IsStrictDecodingError(err) {
    		t.Fatalf("StrictDecodingError not returned on object with duplicate keys: %v, type: %v", err, reflect.TypeOf(err))
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go

    	}
    
    	var strictDecodingErrs []error
    	obj, gvk, err := c.decoder.Decode(data, defaultGVK, decodeInto)
    	if err != nil {
    		if strictErr, ok := runtime.AsStrictDecodingError(err); obj != nil && ok {
    			// save the strictDecodingError and let the caller decide what to do with it
    			strictDecodingErrs = append(strictDecodingErrs, strictErr.Errors()...)
    		} else {
    			return nil, gvk, err
    		}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 03 06:51:04 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go

    		default:
    			strictDecodingError := runtime.NewStrictDecodingError(append(appliedStrictErrs, strictError.Errors()...))
    			return nil, errors.NewInvalid(schema.GroupKind{}, "", field.ErrorList{
    				field.Invalid(field.NewPath("patch"), string(patchedObjJS), strictDecodingError.Error()),
    			})
    		}
    	} else if len(appliedStrictErrs) > 0 {
    		switch {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go

    // As such it is important for callers of DecodeNestedObjects to check to confirm whether
    // an error is a runtime.StrictDecodingError before short circuiting.
    // Similarly, implementations of DecodeNestedObjects should ensure that a runtime.StrictDecodingError
    // is only returned when the rest of decoding has succeeded.
    type NestedObjectDecoder interface {
    	DecodeNestedObjects(d Decoder) error
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun May 28 03:26:35 UTC 2023
    - 19K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor_test.go

    			expectedGVK: &schema.GroupVersionKind{Group: "x", Version: "y", Kind: "z"},
    			assertOnError: func(t *testing.T, err error) {
    				if !runtime.IsStrictDecodingError(err) {
    					t.Errorf("expected StrictDecodingError, got: %v", err)
    				}
    			},
    		},
    		{
    			name:        "no strict mode no strict error",
    			data:        []byte{0xa1, 0x61, 'z', 0x01}, // {'z': 1}
    			gvk:         &schema.GroupVersionKind{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 13 14:57:12 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go

    // example:
    // (1) To configure a JSON serializer, set `Yaml` to `false`.
    // (2) To configure a YAML serializer, set `Yaml` to `true`.
    // (3) To configure a strict serializer that can return strictDecodingError, set `Strict` to `true`.
    type SerializerOptions struct {
    	// Yaml: configures the Serializer to work with JSON(false) or YAML(true).
    	// When `Yaml` is enabled, this serializer only supports the subset of YAML that
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 25 16:08:07 UTC 2022
    - 12K bytes
    - Viewed (0)
Back to top