Versions in this module Expand all Collapse all v0 v0.1.1 Mar 26, 2020 v0.1.0 Jun 12, 2019 Changes in this version + var ErrBadBoolValue = errors.New("bad bool value") + var ErrBadWireType = errors.New("bad wire type") + var ErrUnknownField = errors.New("unknown field") + func CompactTextString(obj interface{}) string + func DecodeVarint(buf []byte) (x uint64, n int) + func EncodeVarint(x uint64) []byte + func Marshal(raw interface{}) ([]byte, error) + func MarshalBool(b *Buffer, fieldIndex uint64, value bool) error + func MarshalBoolSlice(b *Buffer, fieldIndex uint64, value []bool) error + func MarshalBytes(b *Buffer, fieldIndex uint64, value []byte) error + func MarshalFloat32(b *Buffer, fieldIndex uint64, value float32) error + func MarshalFloat32Slice(b *Buffer, fieldIndex uint64, value []float32) error + func MarshalFloat64(b *Buffer, fieldIndex uint64, value float64) error + func MarshalFloat64Slice(b *Buffer, fieldIndex uint64, value []float64) error + func MarshalInt32(b *Buffer, fieldIndex uint64, value int32) error + func MarshalInt32Slice(b *Buffer, fieldIndex uint64, value []int32) error + func MarshalInt64(b *Buffer, fieldIndex uint64, value int64) error + func MarshalInt64Slice(b *Buffer, fieldIndex uint64, value []int64) error + func MarshalString(b *Buffer, fieldIndex uint64, value string) error + func MarshalStringSlice(b *Buffer, fieldIndex uint64, value []string) error + func MarshalStruct(b *Buffer, fieldIndex uint64, msg Struct) error + func MarshalTextString(obj interface{}) string + func MarshalUInt32(b *Buffer, fieldIndex uint64, value uint32) error + func MarshalUInt32Slice(b *Buffer, fieldIndex uint64, value []uint32) error + func MarshalUInt64(b *Buffer, fieldIndex uint64, value uint64) error + func MarshalUInt64Slice(b *Buffer, fieldIndex uint64, value []uint64) error + func Size(raw interface{}) int + func SizeBool(fieldIndex uint64, value bool) int + func SizeBoolSlice(fieldIndex uint64, value []bool) int + func SizeBytes(fieldIndex uint64, value []byte) int + func SizeFloat32(fieldIndex uint64, value float32) int + func SizeFloat32Slice(fieldIndex uint64, value []float32) (ret int) + func SizeFloat64(fieldIndex uint64, value float64) int + func SizeFloat64Slice(fieldIndex uint64, value []float64) (ret int) + func SizeInt32(fieldIndex uint64, value int32) int + func SizeInt32Slice(fieldIndex uint64, value []int32) (ret int) + func SizeInt64(fieldIndex uint64, value int64) int + func SizeInt64Slice(fieldIndex uint64, value []int64) (ret int) + func SizeString(fieldIndex uint64, value string) int + func SizeStringSlice(fieldIndex uint64, value []string) (ret int) + func SizeStruct(fieldIndex uint64, msg Struct) int + func SizeUInt32(fieldIndex uint64, value uint32) int + func SizeUInt32Slice(fieldIndex uint64, value []uint32) (ret int) + func SizeUInt64(fieldIndex uint64, value uint64) int + func SizeUInt64Slice(fieldIndex uint64, value []uint64) (ret int) + func SizeVarint(x uint64) int + func Unmarshal(data []byte, raw interface{}) (err error) + func UnmarshalBool(b *Buffer, wt WireType, ret *bool) error + func UnmarshalBoolSlice(b *Buffer, wt WireType, ret *[]bool) error + func UnmarshalBytes(b *Buffer, wt WireType, ret *[]byte) error + func UnmarshalFloat32(b *Buffer, wt WireType, ret *float32) error + func UnmarshalFloat32Slice(b *Buffer, wt WireType, ret *[]float32) error + func UnmarshalFloat64(b *Buffer, wt WireType, ret *float64) error + func UnmarshalFloat64Slice(b *Buffer, wt WireType, ret *[]float64) error + func UnmarshalInt32(b *Buffer, wt WireType, ret *int32) error + func UnmarshalInt32Slice(b *Buffer, wt WireType, ret *[]int32) error + func UnmarshalInt64(b *Buffer, wt WireType, ret *int64) error + func UnmarshalInt64Slice(b *Buffer, wt WireType, ret *[]int64) error + func UnmarshalString(b *Buffer, wt WireType, ret *string) error + func UnmarshalStringSlice(b *Buffer, wt WireType, ret *[]string) error + func UnmarshalStruct(b *Buffer, wt WireType, msgPtr Struct) error + func UnmarshalUInt32(b *Buffer, wt WireType, ret *uint32) error + func UnmarshalUInt32Slice(b *Buffer, wt WireType, ret *[]uint32) error + func UnmarshalUInt64(b *Buffer, wt WireType, ret *uint64) error + func UnmarshalUInt64Slice(b *Buffer, wt WireType, ret *[]uint64) error + func Zigzag32(x uint64) uint64 + func Zigzag64(x uint64) uint64 + type Buffer struct + func NewBuffer(e []byte) *Buffer + func (self *Buffer) Bytes() []byte + func (self *Buffer) BytesRemains() int + func (self *Buffer) ConsumeBytes(size int) (ret []byte) + func (self *Buffer) DecodeFixed32() (x uint64, err error) + func (self *Buffer) DecodeFixed64() (x uint64, err error) + func (self *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) + func (self *Buffer) DecodeStringBytes() (s string, err error) + func (self *Buffer) DecodeVarint() (x uint64, err error) + func (self *Buffer) DecodeZigzag32() (x uint64, err error) + func (self *Buffer) DecodeZigzag64() (x uint64, err error) + func (self *Buffer) EncodeFixed32(x uint64) error + func (self *Buffer) EncodeFixed64(x uint64) error + func (self *Buffer) EncodeRawBytes(b []byte) error + func (self *Buffer) EncodeStringBytes(s string) error + func (self *Buffer) EncodeVarint(x uint64) error + func (self *Buffer) EncodeZigzag32(x uint64) error + func (self *Buffer) EncodeZigzag64(x uint64) error + func (self *Buffer) Reset() + func (self *Buffer) SetBuf(s []byte) + type Struct interface + Marshal func(buffer *Buffer) error + Size func() int + Unmarshal func(buffer *Buffer, fieldIndex uint64, wt WireType) error + type TextMarshaler struct + Compact bool + CompactBytesSize int + IgnoreDefault bool + OriginalString bool + func (self *TextMarshaler) Marshal(w io.Writer, obj interface{}) error + func (self *TextMarshaler) Text(obj interface{}) string + type WireType = uint64 + const WireBytes + const WireFixed32 + const WireFixed64 + const WireVarint + const WireZigzag32 + const WireZigzag64