0

i'm wondering if it's possible to parse protobuf message at runtime in Go, without using protoc. The schema i want to implement is the following:

  • there is a binary protobuf message
  • there is a .proto text file representing internal structure of the message

I need some kind of library function to feed the binary message along with the parsed .proto file and be able to get message field types/values. Looks like i need something to extract MessageDescriptor and FieldDescriptor from the binary message on the basis of the existing .proto file.

So far i've stumbled upon https://github.com/bufbuild/protocompile and successfully used it to parse .proto file. But i still have no idea how to parse/inspect binary message.

dcpt
  • 81
  • 1
  • 7

0 Answers0