Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IsUnknownOrError (0.22 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy.go

    	m.callbacks[name] = callback
    }
    
    // Contains checks if the key is known to the map
    func (m *MapValue) Contains(key ref.Val) ref.Val {
    	v, found := m.Find(key)
    	if v != nil && types.IsUnknownOrError(v) {
    		return v
    	}
    	return types.Bool(found)
    }
    
    // Iterator returns an iterator to traverse the map.
    func (m *MapValue) Iterator() traits.Iterator {
    	return &iterator{parent: m, index: 0}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/value.go

    		objectType:  declType,
    	}
    }
    
    // Contains returns whether the given key is contained in the MapValue.
    func (m *MapValue) Contains(key ref.Val) ref.Val {
    	v, found := m.Find(key)
    	if v != nil && types.IsUnknownOrError(v) {
    		return v
    	}
    	return celBool(found)
    }
    
    // ConvertToType converts the MapValue to another CEL type, if possible.
    func (m *MapValue) ConvertToType(t ref.Type) ref.Val {
    	switch t {
    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/common/values.go

    		elements = append(elements, next)
    	}
    
    	return &unstructuredList{elements: elements, itemsSchema: t.itemsSchema}
    }
    
    func (t *unstructuredList) Contains(val ref.Val) ref.Val {
    	if types.IsUnknownOrError(val) {
    		return val
    	}
    	var err ref.Val
    	sz := len(t.elements)
    	for i := 0; i < sz; i++ {
    		elem := UnstructuredToVal(t.elements[i], t.itemsSchema)
    		cmp := elem.Equal(val)
    		b, ok := cmp.(types.Bool)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:30:17 UTC 2023
    - 20.5K bytes
    - Viewed (0)
Back to top