pb

package
v0.0.0-...-42c81d0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyMessage = errors.New("Unmarshaled an empty message")

Functions

func MarshalPrefixBytes

func MarshalPrefixBytes(msg Marshaler) ([]byte, error)

MarshalPrefixBytes marshals a uvarint length prefixed protobuf message.

func UnmarshalPrefixAt

func UnmarshalPrefixAt(rat io.ReaderAt, off int64, msg proto.Unmarshaler) (n int, err error)

UnmarshalPrefixAt unmarshals a uvarint length prefixed protobuf message.

Types

type Marshaler

type Marshaler interface {
	Size() int
	MarshalTo(data []byte) (n int, err error)
}

MarshalerTo describes the MarshalTo method for protobuf marshaling.

It is provided here because gogoprotobuf does not provide a public definition.

Jump to

Keyboard shortcuts

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