type description … // newTypeDescription produces a TypeDescription value for the fully-qualified proto type name // with a given descriptor. func newTypeDescription(typeName string, desc protoreflect.MessageDescriptor, extensions extensionMap) *TypeDescription { … } type TypeDescription … // Copy copies the type description with updated references to the Db. func (td *TypeDescription) Copy(pbdb *Db) *TypeDescription { … } // FieldMap returns a string field name to FieldDescription map. func (td *TypeDescription) FieldMap() map[string]*FieldDescription { … } // FieldByName returns (FieldDescription, true) if the field name is declared within the type. func (td *TypeDescription) FieldByName(name string) (*FieldDescription, bool) { … } // MaybeUnwrap accepts a proto message as input and unwraps it to a primitive CEL type if possible. // // This method returns the unwrapped value and 'true', else the original value and 'false'. func (td *TypeDescription) MaybeUnwrap(msg proto.Message) (any, bool, error) { … } // Name returns the fully-qualified name of the type. func (td *TypeDescription) Name() string { … } // New returns a mutable proto message func (td *TypeDescription) New() protoreflect.Message { … } // ReflectType returns the Golang reflect.Type for this type. func (td *TypeDescription) ReflectType() reflect.Type { … } // Zero returns the zero proto.Message value for this type. func (td *TypeDescription) Zero() proto.Message { … } // newFieldDescription creates a new field description from a protoreflect.FieldDescriptor. func newFieldDescription(fieldDesc protoreflect.FieldDescriptor) *FieldDescription { … } type FieldDescription … // CheckedType returns the type-definition used at type-check time. func (fd *FieldDescription) CheckedType() *exprpb.Type { … } // Descriptor returns the protoreflect.FieldDescriptor for this type. func (fd *FieldDescription) Descriptor() protoreflect.FieldDescriptor { … } // IsSet returns whether the field is set on the target value, per the proto presence conventions // of proto2 or proto3 accordingly. // // This function implements the FieldType.IsSet function contract which can be used to operate on // more than just protobuf field accesses; however, the target here must be a protobuf.Message. func (fd *FieldDescription) IsSet(target any) bool { … } // GetFrom returns the accessor method associated with the field on the proto generated struct. // // If the field is not set, the proto default value is returned instead. // // This function implements the FieldType.GetFrom function contract which can be used to operate // on more than just protobuf field accesses; however, the target here must be a protobuf.Message. func (fd *FieldDescription) GetFrom(target any) (any, error) { … } // IsEnum returns true if the field type refers to an enum value. func (fd *FieldDescription) IsEnum() bool { … } // IsMap returns true if the field is of map type. func (fd *FieldDescription) IsMap() bool { … } // IsMessage returns true if the field is of message type. func (fd *FieldDescription) IsMessage() bool { … } // IsOneof returns true if the field is declared within a oneof block. func (fd *FieldDescription) IsOneof() bool { … } // IsList returns true if the field is a repeated value. // // This method will also return true for map values, so check whether the // field is also a map. func (fd *FieldDescription) IsList() bool { … } // MaybeUnwrapDynamic takes the reflected protoreflect.Message and determines whether the // value can be unwrapped to a more primitive CEL type. // // This function returns the unwrapped value and 'true' on success, or the original value // and 'false' otherwise. func (fd *FieldDescription) MaybeUnwrapDynamic(msg protoreflect.Message) (any, bool, error) { … } // Name returns the CamelCase name of the field within the proto-based struct. func (fd *FieldDescription) Name() string { … } // ProtoKind returns the protobuf reflected kind of the field. func (fd *FieldDescription) ProtoKind() protoreflect.Kind { … } // ReflectType returns the Golang reflect.Type for this field. func (fd *FieldDescription) ReflectType() reflect.Type { … } // String returns the fully qualified name of the field within its type as well as whether the // field occurs within a oneof. func (fd *FieldDescription) String() string { … } // Zero returns the zero value for the protobuf message represented by this field. // // If the field is not a proto.Message type, the zero value is nil. func (fd *FieldDescription) Zero() proto.Message { … } func (fd *FieldDescription) typeDefToType() *exprpb.Type { … } type Map … func checkedMessageType(name string) *exprpb.Type { … } func checkedPrimitive(primitive exprpb.Type_PrimitiveType) *exprpb.Type { … } func checkedWellKnown(wellKnown exprpb.Type_WellKnownType) *exprpb.Type { … } func checkedWrap(t *exprpb.Type) *exprpb.Type { … } // unwrap unwraps the provided proto.Message value, potentially based on the description if the // input message is a *dynamicpb.Message which obscures the typing information from Go. // // Returns the unwrapped value and 'true' if unwrapped, otherwise the input value and 'false'. func unwrap(desc description, msg proto.Message) (any, bool, error) { … } // unwrapDynamic unwraps a reflected protobuf Message value. // // Returns the unwrapped value and 'true' if unwrapped, otherwise the input value and 'false'. func unwrapDynamic(desc description, refMsg protoreflect.Message) (any, bool, error) { … } // reflectTypeOf intercepts the reflect.Type call to ensure that dynamicpb.Message types preserve // well-known protobuf reflected types expected by the CEL type system. func reflectTypeOf(val any) reflect.Type { … } // zeroValueOf will return the strongest possible proto.Message representing the default protobuf // message value of the input msg type. func zeroValueOf(msg proto.Message) proto.Message { … } var jsonValueTypeURL … var zeroValueMap …