Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deserializer ¶
type Deserializer struct {
JSONUnmarshaler *jsonpb.Unmarshaler
}
Deserializer deserializes.
func New ¶
func New() *Deserializer
func (Deserializer) JSONToProto ¶
func (d Deserializer) JSONToProto(requestBody io.ReadCloser, unmarshalObj proto.Message) (err error)
JSONToProto converts json stream to protobuf
func (Deserializer) YAMLToProto ¶
func (d Deserializer) YAMLToProto(data []byte, msg proto.Message) error
YAMLToProto does a roundabout way of converting yaml to protobuf by using json as intermediary
func (Deserializer) YAMLToStruct ¶
func (d Deserializer) YAMLToStruct(data []byte, resp interface{}) error
YAMLToStruct populates your struct with specified byte array
Click to show internal directories.
Click to hide internal directories.