type EncodeStyle … const BlockValueStyle … const FlowValueStyle … const FoldedValueStyle … const LiteralStyle … // NewEmptyDynValue returns the zero-valued DynValue. func NewEmptyDynValue() *DynValue { … } // NewDynValue returns a DynValue that corresponds to a parse node id and value. func NewDynValue(id int64, val interface{ … } type DynValue … // DeclType returns the policy model type of the dyn value. func (dv *DynValue) DeclType() *DeclType { … } // ConvertToNative is an implementation of the CEL ref.Val method used to adapt between CEL types // and Go-native types. // // The default behavior of this method is to first convert to a CEL type which has a well-defined // set of conversion behaviors and proxy to the CEL ConvertToNative method for the type. func (dv *DynValue) ConvertToNative(typeDesc reflect.Type) (interface{ … } // Equal returns whether the dyn value is equal to a given CEL value. func (dv *DynValue) Equal(other ref.Val) ref.Val { … } // ExprValue converts the DynValue into a CEL value. func (dv *DynValue) ExprValue() ref.Val { … } // Value returns the underlying value held by this reference. func (dv *DynValue) Value() interface{ … } // SetValue updates the underlying value held by this reference. func (dv *DynValue) SetValue(value interface{ … } // Type returns the CEL type for the given value. func (dv *DynValue) Type() ref.Type { … } func exprValue(value interface{ … } type PlainTextValue … type MultilineStringValue … func newStructValue() *structValue { … } type structValue … // AddField appends a MapField to the MapValue and indexes the field by name. func (sv *structValue) AddField(field *Field) { … } // ConvertToNative converts the MapValue type to a native go types. func (sv *structValue) ConvertToNative(typeDesc reflect.Type) (interface{ … } // GetField returns a MapField by name if one exists. func (sv *structValue) GetField(name string) (*Field, bool) { … } // IsSet returns whether the given field, which is defined, has also been set. func (sv *structValue) IsSet(key ref.Val) ref.Val { … } // NewObjectValue creates a struct value with a schema type and returns the empty ObjectValue. func NewObjectValue(sType *DeclType) *ObjectValue { … } type ObjectValue … // ConvertToType is an implementation of the CEL ref.Val interface method. func (o *ObjectValue) ConvertToType(t ref.Type) ref.Val { … } // Equal returns true if the two object types are equal and their field values are equal. func (o *ObjectValue) Equal(other ref.Val) ref.Val { … } // Get returns the value of the specified field. // // If the field is set, its value is returned. If the field is not set, the default value for the // field is returned thus allowing for safe-traversal and preserving proto-like field traversal // semantics for Open API Schema backed types. func (o *ObjectValue) Get(name ref.Val) ref.Val { … } // Type returns the CEL type value of the object. func (o *ObjectValue) Type() ref.Type { … } // Value returns the Go-native representation of the object. func (o *ObjectValue) Value() interface{ … } // NewMapValue returns an empty MapValue. func NewMapValue() *MapValue { … } type MapValue … // ConvertToObject produces an ObjectValue from the MapValue with the associated schema type. // // The conversion is shallow and the memory shared between the Object and Map as all references // to the map are expected to be replaced with the Object reference. func (m *MapValue) ConvertToObject(declType *DeclType) *ObjectValue { … } // Contains returns whether the given key is contained in the MapValue. func (m *MapValue) Contains(key ref.Val) ref.Val { … } // ConvertToType converts the MapValue to another CEL type, if possible. func (m *MapValue) ConvertToType(t ref.Type) ref.Val { … } // Equal returns true if the maps are of the same size, have the same keys, and the key-values // from each map are equal. func (m *MapValue) Equal(other ref.Val) ref.Val { … } // Find returns the value for the key in the map, if found. func (m *MapValue) Find(name ref.Val) (ref.Val, bool) { … } // Get returns the value for the key in the map, or error if not found. func (m *MapValue) Get(key ref.Val) ref.Val { … } // Iterator produces a traits.Iterator which walks over the map keys. // // The Iterator is frequently used within comprehensions. func (m *MapValue) Iterator() traits.Iterator { … } // Size returns the number of keys in the map. func (m *MapValue) Size() ref.Val { … } // Type returns the CEL ref.Type for the map. func (m *MapValue) Type() ref.Type { … } // Value returns the Go-native representation of the MapValue. func (m *MapValue) Value() interface{ … } type baseMapIterator … // HasNext implements the traits.Iterator interface method. func (it *baseMapIterator) HasNext() ref.Val { … } // Next implements the traits.Iterator interface method. func (it *baseMapIterator) Next() ref.Val { … } // Type implements the CEL ref.Val interface metohd. func (it *baseMapIterator) Type() ref.Type { … } // NewField returns a MapField instance with an empty DynValue that refers to the // specified parse node id and field name. func NewField(id int64, name string) *Field { … } type Field … // NewListValue returns an empty ListValue instance. func NewListValue() *ListValue { … } type ListValue … // Add concatenates two lists together to produce a new CEL list value. func (lv *ListValue) Add(other ref.Val) ref.Val { … } // Append adds another entry into the ListValue. func (lv *ListValue) Append(entry *DynValue) { … } // Contains returns whether the input `val` is equal to an element in the list. // // If any pair-wise comparison between the input value and the list element is an error, the // operation will return an error. func (lv *ListValue) Contains(val ref.Val) ref.Val { … } // ConvertToNative is an implementation of the CEL ref.Val method used to adapt between CEL types // and Go-native array-like types. func (lv *ListValue) ConvertToNative(typeDesc reflect.Type) (interface{ … } // ConvertToType converts the ListValue to another CEL type. func (lv *ListValue) ConvertToType(t ref.Type) ref.Val { … } // Equal returns true if two lists are of the same size, and the values at each index are also // equal. func (lv *ListValue) Equal(other ref.Val) ref.Val { … } // Get returns the value at the given index. // // If the index is negative or greater than the size of the list, an error is returned. func (lv *ListValue) Get(idx ref.Val) ref.Val { … } // Iterator produces a traits.Iterator suitable for use in CEL comprehension macros. func (lv *ListValue) Iterator() traits.Iterator { … } // Size returns the number of elements in the list. func (lv *ListValue) Size() ref.Val { … } // Type returns the CEL ref.Type for the list. func (lv *ListValue) Type() ref.Type { … } // Value returns the Go-native value. func (lv *ListValue) Value() interface{ … } // finalizeValueSet inspects the ListValue entries in order to make internal optimizations once all list // entries are known. func (lv *ListValue) finalizeValueSet() { … } type baseVal … func (*baseVal) ConvertToNative(typeDesc reflect.Type) (interface{ … } func (*baseVal) ConvertToType(t ref.Type) ref.Val { … } func (*baseVal) Equal(other ref.Val) ref.Val { … } func (v *baseVal) Value() interface{ … } type baseListIterator … func (it *baseListIterator) HasNext() ref.Val { … } func (it *baseListIterator) Next() ref.Val { … } func (it *baseListIterator) Type() ref.Type { … } func celBool(pred bool) ref.Val { … } var unknownType …