Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewErr (0.08 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/common/values.go

    			return types.NullValue
    		}
    		return types.NewErr("invalid data, got null for schema with nullable=false")
    	}
    	if schema.IsXIntOrString() {
    		switch v := unstructured.(type) {
    		case string:
    			return types.String(v)
    		case int:
    			return types.Int(v)
    		case int32:
    			return types.Int(v)
    		case int64:
    			return types.Int(v)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:30:17 UTC 2023
    - 20.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/value.go

    	if found {
    		return field.Ref.ExprValue()
    	}
    	fieldDef, found := o.objectType.Fields[nameStr]
    	if !found {
    		return types.NewErr("no such field: %s", nameStr)
    	}
    	defValue := fieldDef.DefaultValue()
    	if defValue != nil {
    		return defValue
    	}
    	return types.NewErr("no default for type: %s", fieldDef.TypeName())
    }
    
    // Type returns the CEL type value of the object.
    func (o *ObjectValue) Type() ref.Type {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 20.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/cel/library/authz.go

    	}
    
    	if errors := apimachineryvalidation.ValidateServiceAccountName(name, false); len(errors) > 0 {
    		return types.NewErr("Invalid service account name")
    	}
    	if errors := apimachineryvalidation.ValidateNamespaceName(namespace, false); len(errors) > 0 {
    		return types.NewErr("Invalid service account namespace")
    	}
    	return authz.serviceAccount(namespace, name)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/library/ip.go

    	if !ok {
    		return types.MaybeNoSuchOverloadErr(arg)
    	}
    
    	addr, err := parseIPAddr(s)
    	if err != nil {
    		// Don't add context, we control the error message already.
    		return types.NewErr("%v", err)
    	}
    
    	return apiservercel.IP{
    		Addr: addr,
    	}
    }
    
    func ipToString(arg ref.Val) ref.Val {
    	ip, ok := arg.(apiservercel.IP)
    	if !ok {
    		return types.MaybeNoSuchOverloadErr(arg)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 11:02:34 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/converter.go

    	}
    	if c.mismatchDetection {
    		newUnstr := map[string]interface{}{}
    		newErr := toUnstructuredViaJSON(obj, &newUnstr)
    		if (err != nil) != (newErr != nil) {
    			klog.Fatalf("ToUnstructured unexpected error for %v: error: %v; newErr: %v", obj, err, newErr)
    		}
    		if err == nil && !c.comparison.DeepEqual(u, newUnstr) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 24.9K bytes
    - Viewed (0)
Back to top