gogoprotobuf

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDecoder

func NewDecoder(r io.Reader) goa.Decoder

NewDecoder returns a new proto.Decoder that satisfies goa.Decoder

func NewEncoder

func NewEncoder(w io.Writer) goa.Encoder

NewEncoder returns a new proto.Encoder that satisfies goa.Encoder

Types

type ProtoDecoder

type ProtoDecoder struct {
	// contains filtered or unexported fields
}

ProtoDecoder stores state between Reset and Decode

func (*ProtoDecoder) Decode

func (dec *ProtoDecoder) Decode(v interface{}) error

Decode unmarshals an io.Reader into proto.Message v

func (*ProtoDecoder) Reset

func (dec *ProtoDecoder) Reset(r io.Reader)

Reset stores the new reader and resets its bytes.Buffer and proto.Buffer

type ProtoEncoder

type ProtoEncoder struct {
	// contains filtered or unexported fields
}

ProtoEncoder stores state between Reset and Encode

func (*ProtoEncoder) Encode

func (enc *ProtoEncoder) Encode(v interface{}) error

Encode marshals a proto.Message and writes it to an io.Writer

func (*ProtoEncoder) Reset

func (enc *ProtoEncoder) Reset(w io.Writer)

Reset stores the new writer and resets its proto.Buffer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL