Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeProtobufToJSON ¶
DecodeProtobufToJSON is a wrapper for decoding/unmarshalling []byte of protobuf into a dynamic.Message and then marshalling that into JSON.
func FindMessageDescriptor ¶
func FindMessageDescriptor(protobufDirs []string, protobufRootMessage string) (*desc.MessageDescriptor, error)
FindMessageDescriptor is a wrapper that will:
- Recursively find all .proto files in a directory
- Attempt to read and parse all files as proto FileDescriptors
- Attempt to find the specified "protobufRootMessage" type in the parsed FileDescriptors; if found, return the related MessageDescriptor
With the found MessageDescriptor, we are able to generate new dynamic messages via dynamic.NewMessage(..).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.