package lazy
import "k8s.io/apiserver/pkg/cel/lazy"
Index ¶
- type GetFieldFunc
- type MapValue
- func NewMapValue(objectType ref.Type) *MapValue
- func (m *MapValue) Append(name string, callback GetFieldFunc)
- func (m *MapValue) Contains(key ref.Val) ref.Val
- func (m *MapValue) ConvertToNative(typeDesc reflect.Type) (any, error)
- func (m *MapValue) ConvertToType(typeVal ref.Type) ref.Val
- func (m *MapValue) Equal(other ref.Val) ref.Val
- func (m *MapValue) Find(key ref.Val) (ref.Val, bool)
- func (m *MapValue) Get(key ref.Val) ref.Val
- func (m *MapValue) Iterator() traits.Iterator
- func (m *MapValue) Size() ref.Val
- func (m *MapValue) Type() ref.Type
- func (m *MapValue) Value() any
Types ¶
type GetFieldFunc ¶
type MapValue ¶
type MapValue struct {
// contains filtered or unexported fields
}
MapValue is a map that lazily evaluate its value when a field is first accessed. The map value is not designed to be thread-safe.
func NewMapValue ¶
func (*MapValue) Append ¶
func (m *MapValue) Append(name string, callback GetFieldFunc)
Append adds the given field with its name and callback.
func (*MapValue) Contains ¶
Contains checks if the key is known to the map
func (*MapValue) ConvertToNative ¶
ConvertToNative returns an error because it is disallowed
func (*MapValue) ConvertToType ¶
ConvertToType converts the map to the given type. Only its own type and "Type" type are allowed.
func (*MapValue) Equal ¶
Equal returns true if the other object is the same pointer-wise.
func (*MapValue) Find ¶
func (*MapValue) Get ¶
func (*MapValue) Iterator ¶
Iterator returns an iterator to traverse the map.
func (*MapValue) Size ¶
Size returns the number of currently known fields
func (*MapValue) Type ¶
Type returns its registered type.
func (*MapValue) Value ¶
Value is not allowed.
Source Files ¶
lazy.go
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 hour ago –
Tools for package owners.