Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/composition.go

    	if a.result.Error != nil {
    		return types.NewErr("composited variable %q fails to compile: %v", a.name, a.result.Error)
    	}
    
    	v, details, err := a.result.Program.ContextEval(a.context, a.activation)
    	if details == nil {
    		return types.NewErr("unable to get evaluation details of variable %q", a.name)
    	}
    	costPtr := details.ActualCost()
    	if costPtr == nil {
    		return types.NewErr("unable to calculate cost of variable %q", a.name)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 13 21:06:39 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/quantity.go

    }
    
    func (d Quantity) ConvertToType(typeVal ref.Type) ref.Val {
    	switch typeVal {
    	case quantityTypeValue:
    		return d
    	case types.TypeType:
    		return quantityTypeValue
    	default:
    		return types.NewErr("type conversion error from '%s' to '%s'", quantityTypeValue, typeVal)
    	}
    }
    
    func (d Quantity) Equal(other ref.Val) ref.Val {
    	otherDur, ok := other.(Quantity)
    	if !ok {
    		return types.MaybeNoSuchOverloadErr(other)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 11:23:54 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/cel/format.go

    }
    
    func (d *Format) ConvertToType(typeVal ref.Type) ref.Val {
    	switch typeVal {
    	case FormatType:
    		return d
    	case types.TypeType:
    		return FormatType
    	default:
    		return types.NewErr("type conversion error from '%s' to '%s'", FormatType, typeVal)
    	}
    }
    
    func (d *Format) Equal(other ref.Val) ref.Val {
    	otherDur, ok := other.(*Format)
    	if !ok {
    		return types.MaybeNoSuchOverloadErr(other)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/mutation/common/val.go

    func (v *ObjectVal) ConvertToType(typeValue ref.Type) ref.Val {
    	switch typeValue {
    	case v.typeRef:
    		return v
    	case types.TypeType:
    		return v.typeRef.CELType()
    	}
    	return types.NewErr("unsupported conversion into %v", typeValue)
    }
    
    // Equal returns true if the `other` value has the same type and content as the implementing struct.
    func (v *ObjectVal) Equal(other ref.Val) ref.Val {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 27 21:55:08 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy_test.go

    	variablesMap.Append("dict", func(_ *MapValue) ref.Val {
    		evalCounter++
    		v, err := compileAndRun(env, activation, `{"a": "a"}`)
    		if err != nil {
    			return types.NewErr(err.Error())
    		}
    		return v
    	})
    
    	// iterate the map with .all
    	exp = `variables.all(n, n != "")`
    	v, err = compileAndRun(env, activation, exp)
    	if err != nil {
    		t.Fatalf("%q: %v", exp, err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top