Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ValidateListSetsAndMaps (0.33 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/listtype/validation.go

    	"k8s.io/apimachinery/pkg/util/validation/field"
    
    	"k8s.io/apiextensions-apiserver/pkg/apiserver/schema"
    )
    
    // ValidateListSetsAndMaps validates that arrays with x-kubernetes-list-type "map" and "set" fulfill the uniqueness
    // invariants for the keys (maps) and whole elements (sets).
    func ValidateListSetsAndMaps(fldPath *field.Path, s *schema.Structural, obj map[string]interface{}) field.ErrorList {
    	if s == nil || obj == nil {
    		return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 16 02:47:24 UTC 2021
    - 5.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy.go

    	// ratcheting validation of x-kubernetes-list-type value map and set
    	if newErrs := structurallisttype.ValidateListSetsAndMaps(nil, a.structuralSchema, uNew.Object); len(newErrs) > 0 {
    		if oldErrs := structurallisttype.ValidateListSetsAndMaps(nil, a.structuralSchema, uOld.Object); len(oldErrs) == 0 {
    			errs = append(errs, newErrs...)
    		}
    	}
    
    	// validate x-kubernetes-validations rules
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 22:16:10 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go

    	// ratcheting validation of x-kubernetes-list-type value map and set
    	if oldErrs := structurallisttype.ValidateListSetsAndMaps(nil, a.structuralSchema, uOld.Object); len(oldErrs) == 0 {
    		errs = append(errs, structurallisttype.ValidateListSetsAndMaps(nil, a.structuralSchema, uNew.Object)...)
    	}
    
    	// validate x-kubernetes-validations rules
    	if celValidator := a.celValidator; celValidator != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 21:22:34 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/listtype/validation_test.go

    				duplicate("root", "multiple duplicates[4]"),
    				duplicate("root", "multiple duplicates[5]"),
    			},
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			errs := ValidateListSetsAndMaps(field.NewPath("root"), tt.schema, tt.obj)
    
    			seenErrs := make([]bool, len(errs))
    
    			for _, expectedError := range tt.errors {
    				found := false
    				for i, err := range errs {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 24.2K bytes
    - Viewed (0)
Back to top