Documentation
¶
Overview ¶
Package proto implements a marshaler interface for protocol buffers.
Index ¶
- type Proto
- func (p *Proto) ContentTypes() []string
- func (p *Proto) Exts() []string
- func (p *Proto) Marshal(value interface{}) ([]byte, error)
- func (p *Proto) Marshals(v any) bool
- func (p *Proto) Name() string
- func (p *Proto) NewDecoder(reader io.Reader) codecs.Decoder
- func (p *Proto) NewEncoder(writer io.Writer) codecs.Encoder
- func (p *Proto) Unmarshal(data []byte, value interface{}) error
- func (p *Proto) Unmarshals(v any) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proto ¶
type Proto struct{}
Proto is a proto marshaler that can encode and decode protocol buffers.
func (*Proto) ContentTypes ¶
ContentTypes returns the list of content types this marshaller is able to handle.
func (*Proto) NewDecoder ¶
NewDecoder returns a Decoder which reads proto stream from "reader".
func (*Proto) NewEncoder ¶
NewEncoder returns an Encoder which writes proto stream into "writer".
func (*Proto) Unmarshals ¶ added in v0.2.0
Unmarshals returns if this is able to decode the given type.
Click to show internal directories.
Click to hide internal directories.