║ ExtensionType ║ ║ ExtensionTypeDescriptor ║ ║ ExtensionDescriptor ║ Using Go reflection as an analogy, the ProtoReflect method is similar toĬalling reflect.ValueOf, and the Message.Interface method is similar to Just as how Go's reflect.Value is a reflective view over a Go value,Ī Message is a reflective view over a concrete protobuf message instance. Generated messages implement ProtoMessage, which can convert to a Message. A Message is a reflective view over a concrete message instance.Or constructing a dynamic MessageType using dynamicpb.NewMessageType. In order to construct a MessageTypeįrom just a MessageDescriptor, you can consider looking up the message type A MessageDescriptor describes an abstract protobuf message type.Just as how Go's reflect.Type is a reflective description of a Go type,Ī MessageType is a reflective description of a Go type for a protobuf message. It has a MessageDescriptor and can construct a Message instance. A MessageType describes a concrete Go message type. ║ MessageType ║ ║ MessageDescriptor ║ ║ Message ║ ║ ProtoMessage ║
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |