nano: github.com/lonnng/nano/serialize/protobuf Index | Files

package protobuf

import "github.com/lonnng/nano/serialize/protobuf"

Index

Package Files

protobuf.go

Variables

var ErrWrongValueType = errors.New("protobuf: convert on wrong type value")

ErrWrongValueType is the error used for marshal the value with protobuf encoding.

type Serializer Uses

type Serializer struct{}

Serializer implements the serialize.Serializer interface

func NewSerializer Uses

func NewSerializer() *Serializer

NewSerializer returns a new Serializer.

func (*Serializer) Marshal Uses

func (s *Serializer) Marshal(v interface{}) ([]byte, error)

Marshal returns the protobuf encoding of v.

func (*Serializer) Unmarshal Uses

func (s *Serializer) Unmarshal(data []byte, v interface{}) error

Unmarshal parses the protobuf-encoded data and stores the result in the value pointed to by v.

Package protobuf imports 2 packages (graph). Updated 2019-07-25. Refresh now. Tools for package owners.