Documentation ¶
Overview ¶
Package proto2struct contains code to convert protocol buffers to Mangle structs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoEnumToConstant ¶
func ProtoEnumToConstant(ed protoreflect.EnumDescriptor, val protoreflect.Value) (ast.Constant, error)
ProtoEnumToConstant uses reflection to convert a proto field value to a Mangle value.
func ProtoToStruct ¶
func ProtoToStruct(msg protoreflect.Message) (ast.Constant, error)
ProtoToStruct uses reflection to convert a proto to a Mangle struct. The resulting struct only contains that are considered populated by the go protobuf runtime, i.e. proto fields set to default values will be missing.
func ProtoValueToConstant ¶
func ProtoValueToConstant(fd protoreflect.FieldDescriptor, val protoreflect.Value) (ast.Constant, error)
ProtoValueToConstant uses reflection to convert a proto field value to a Mangle value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.