Documentation ¶
Overview ¶
Package proto encodes a parser.Interface into marshaled protocol buffer. This can be used for transcoding or dynamic marshaling. Dynamic marshaling is when the protocol buffer has not been compiled into the source and only the descriptor struct is available.
TODO: more tests
TODO: support for packed, proto3, maps, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
Encoder encodes a parser.Interface into a byte slice containing marshaled protocol buffer.
func NewEncoder ¶
func NewEncoder(desc *descriptor.FileDescriptorSet, pkgName, msgName string) (Encoder, error)
NewEncoder returns an Encoder that can marshal a parser.Interface into the specified protocol buffer message.
Click to show internal directories.
Click to hide internal directories.