Documentation ¶
Index ¶
- func DecodeProtobufToJSON(readOpts *opts.ReadOptions, fds *dpb.FileDescriptorSet, message []byte) ([]byte, error)
- func FindMessageDescriptorInFDS(fds *dpb.FileDescriptorSet, messageName string) (*desc.MessageDescriptor, error)
- func GetAllMessageDescriptorsInFDS(fds *dpb.FileDescriptorSet) ([]*desc.FileDescriptor, error)
- func ProcessDescriptors(pbDirs []string, fdsFile string) (*dpb.FileDescriptorSet, error)
- type MDType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeProtobufToJSON ¶
func DecodeProtobufToJSON(readOpts *opts.ReadOptions, fds *dpb.FileDescriptorSet, message []byte) ([]byte, error)
DecodeProtobufToJSON is a wrapper for decoding/unmarshalling []byte of protobuf into a dynamic.Message and then marshalling that into JSON.
func FindMessageDescriptorInFDS ¶ added in v1.0.0
func FindMessageDescriptorInFDS(fds *dpb.FileDescriptorSet, messageName string) (*desc.MessageDescriptor, error)
func GetAllMessageDescriptorsInFDS ¶ added in v1.8.0
func GetAllMessageDescriptorsInFDS(fds *dpb.FileDescriptorSet) ([]*desc.FileDescriptor, error)
GetAllMessageDescriptorsInFDS returns all file descriptors from a set. The slice of descriptors is used for dynamic.AnyResolver to handle google.protobuf.Any typed fields
func ProcessDescriptors ¶ added in v1.8.0
func ProcessDescriptors(pbDirs []string, fdsFile string) (*dpb.FileDescriptorSet, error)
ProcessDescriptors will return a protobuf file descriptor set that is generated from either a bunch of .proto files in a directory, or directly from a .fds/.protoset file
Types ¶
Click to show internal directories.
Click to hide internal directories.