Versions in this module Expand all Collapse all v1 v1.1.0 Nov 25, 2019 v1.0.0 Nov 21, 2018 Changes in this version + const ArrayHeaderSize + const BoolSize + const ByteSize + const BytesPrefixSize + const Complex128Extension + const Complex128Size + const Complex64Extension + const Complex64Size + const ExtensionPrefixSize + const Float32Size + const Float64Size + const Int16Size + const Int32Size + const Int64Size + const Int8Size + const IntSize + const MapHeaderSize + const NilSize + const StringPrefixSize + const TimeExtension + const TimeSize + const Uint16Size + const Uint32Size + const Uint64Size + const Uint8Size + const UintSize + var ErrShortBytes error = errShort + var Nowhere io.Writer = nwhere + func AppendArrayHeader(b []byte, sz uint32) []byte + func AppendBool(b []byte, t bool) []byte + func AppendByte(b []byte, u byte) []byte + func AppendBytes(b []byte, bts []byte) []byte + func AppendComplex128(b []byte, c complex128) []byte + func AppendComplex64(b []byte, c complex64) []byte + func AppendExtension(b []byte, e Extension) ([]byte, error) + func AppendFloat32(b []byte, f float32) []byte + func AppendFloat64(b []byte, f float64) []byte + func AppendInt(b []byte, i int) []byte + func AppendInt16(b []byte, i int16) []byte + func AppendInt32(b []byte, i int32) []byte + func AppendInt64(b []byte, i int64) []byte + func AppendInt8(b []byte, i int8) []byte + func AppendIntf(b []byte, i interface{}) ([]byte, error) + func AppendMapHeader(b []byte, sz uint32) []byte + func AppendMapStrIntf(b []byte, m map[string]interface{}) ([]byte, error) + func AppendMapStrStr(b []byte, m map[string]string) []byte + func AppendNil(b []byte) []byte + func AppendString(b []byte, s string) []byte + func AppendStringFromBytes(b []byte, str []byte) []byte + func AppendTime(b []byte, t time.Time) []byte + func AppendUint(b []byte, u uint) []byte + func AppendUint16(b []byte, u uint16) []byte + func AppendUint32(b []byte, u uint32) []byte + func AppendUint64(b []byte, u uint64) []byte + func AppendUint8(b []byte, u uint8) []byte + func CopyReplace(key string, raw []byte, val []byte) []byte + func CopyToJSON(dst io.Writer, src io.Reader) (n int64, err error) + func Decode(r io.Reader, d Decodable) error + func Encode(w io.Writer, e Encodable) error + func GuessSize(i interface{}) int + func HasKey(key string, raw []byte) bool + func IsNil(b []byte) bool + func Locate(key string, raw []byte) []byte + func ReadArrayHeaderBytes(b []byte) (sz uint32, o []byte, err error) + func ReadBoolBytes(b []byte) (bool, []byte, error) + func ReadByteBytes(b []byte) (byte, []byte, error) + func ReadBytesBytes(b []byte, scratch []byte) (v []byte, o []byte, err error) + func ReadBytesZC(b []byte) (v []byte, o []byte, err error) + func ReadComplex128Bytes(b []byte) (c complex128, o []byte, err error) + func ReadComplex64Bytes(b []byte) (c complex64, o []byte, err error) + func ReadExactBytes(b []byte, into []byte) (o []byte, err error) + func ReadExtensionBytes(b []byte, e Extension) ([]byte, error) + func ReadFile(dst Unmarshaler, file *os.File) error — darwin/amd64, linux/amd64, windows/amd64 + func ReadFloat32Bytes(b []byte) (f float32, o []byte, err error) + func ReadFloat64Bytes(b []byte) (f float64, o []byte, err error) + func ReadInt16Bytes(b []byte) (int16, []byte, error) + func ReadInt32Bytes(b []byte) (int32, []byte, error) + func ReadInt64Bytes(b []byte) (i int64, o []byte, err error) + func ReadInt8Bytes(b []byte) (int8, []byte, error) + func ReadIntBytes(b []byte) (int, []byte, error) + func ReadIntfBytes(b []byte) (i interface{}, o []byte, err error) + func ReadMapHeaderBytes(b []byte) (sz uint32, o []byte, err error) + func ReadMapKeyZC(b []byte) ([]byte, []byte, error) + func ReadMapStrIntfBytes(b []byte, old map[string]interface{}) (v map[string]interface{}, o []byte, err error) + func ReadNilBytes(b []byte) ([]byte, error) + func ReadStringAsBytes(b []byte, scratch []byte) (v []byte, o []byte, err error) + func ReadStringBytes(b []byte) (string, []byte, error) + func ReadStringZC(b []byte) (v []byte, o []byte, err error) + func ReadTimeBytes(b []byte) (t time.Time, o []byte, err error) + func ReadUint16Bytes(b []byte) (uint16, []byte, error) + func ReadUint32Bytes(b []byte) (uint32, []byte, error) + func ReadUint64Bytes(b []byte) (u uint64, o []byte, err error) + func ReadUint8Bytes(b []byte) (uint8, []byte, error) + func ReadUintBytes(b []byte) (uint, []byte, error) + func RegisterExtension(typ int8, f func() Extension) + func Remove(key string, raw []byte) []byte + func Replace(key string, raw []byte, val []byte) []byte + func Require(old []byte, extra int) []byte + func Skip(b []byte) ([]byte, error) + func UnmarshalAsJSON(w io.Writer, msg []byte) ([]byte, error) + func UnsafeBytes(s string) []byte + func UnsafeString(b []byte) string + func WriteFile(src MarshalSizer, file *os.File) error — darwin/amd64, linux/amd64, windows/amd64 + type ArrayError struct + Got uint32 + Wanted uint32 + func (a ArrayError) Error() string + func (a ArrayError) Resumable() bool + type Decodable interface + DecodeMsg func(*Reader) error + type Encodable interface + EncodeMsg func(*Writer) error + type EndlessReader struct + func NewEndlessReader(b []byte, tb timer) *EndlessReader + func (c *EndlessReader) Read(p []byte) (int, error) + type ErrUnsupportedType struct + T reflect.Type + func (e *ErrUnsupportedType) Error() string + func (e *ErrUnsupportedType) Resumable() bool + type Error interface + Resumable func() bool + type Extension interface + ExtensionType func() int8 + Len func() int + MarshalBinaryTo func([]byte) error + UnmarshalBinary func([]byte) error + type ExtensionTypeError struct + Got int8 + Want int8 + func (e ExtensionTypeError) Error() string + func (e ExtensionTypeError) Resumable() bool + type IntOverflow struct + FailedBitsize int + Value int64 + func (i IntOverflow) Error() string + func (i IntOverflow) Resumable() bool + type InvalidPrefixError byte + func (i InvalidPrefixError) Error() string + func (i InvalidPrefixError) Resumable() bool + type MarshalSizer interface — darwin/amd64, linux/amd64, windows/amd64 + type Marshaler interface + MarshalMsg func([]byte) ([]byte, error) + type Number struct + func (n *Number) AsFloat32(f float32) + func (n *Number) AsFloat64(f float64) + func (n *Number) AsInt(i int64) + func (n *Number) AsUint(u uint64) + func (n *Number) DecodeMsg(r *Reader) error + func (n *Number) EncodeMsg(w *Writer) error + func (n *Number) Float() (float64, bool) + func (n *Number) Int() (int64, bool) + func (n *Number) MarshalJSON() ([]byte, error) + func (n *Number) MarshalMsg(b []byte) ([]byte, error) + func (n *Number) Msgsize() int + func (n *Number) String() string + func (n *Number) Type() Type + func (n *Number) Uint() (uint64, bool) + func (n *Number) UnmarshalMsg(b []byte) ([]byte, error) + type Raw []byte + func (r *Raw) DecodeMsg(f *Reader) error + func (r *Raw) MarshalJSON() ([]byte, error) + func (r *Raw) UnmarshalMsg(b []byte) ([]byte, error) + func (r Raw) EncodeMsg(w *Writer) error + func (r Raw) MarshalMsg(b []byte) ([]byte, error) + func (r Raw) Msgsize() int + type RawExtension struct + Data []byte + Type int8 + func (r *RawExtension) ExtensionType() int8 + func (r *RawExtension) Len() int + func (r *RawExtension) MarshalBinaryTo(d []byte) error + func (r *RawExtension) UnmarshalBinary(b []byte) error + type Reader struct + R *fwd.Reader + func NewReader(r io.Reader) *Reader + func NewReaderSize(r io.Reader, sz int) *Reader + func (m *Reader) BufferSize() int + func (m *Reader) Buffered() int + func (m *Reader) CopyNext(w io.Writer) (int64, error) + func (m *Reader) IsNil() bool + func (m *Reader) NextType() (Type, error) + func (m *Reader) Read(p []byte) (int, error) + func (m *Reader) ReadArrayHeader() (sz uint32, err error) + func (m *Reader) ReadBool() (b bool, err error) + func (m *Reader) ReadByte() (b byte, err error) + func (m *Reader) ReadBytes(scratch []byte) (b []byte, err error) + func (m *Reader) ReadBytesHeader() (sz uint32, err error) + func (m *Reader) ReadComplex128() (f complex128, err error) + func (m *Reader) ReadComplex64() (f complex64, err error) + func (m *Reader) ReadExactBytes(into []byte) error + func (m *Reader) ReadExtension(e Extension) (err error) + func (m *Reader) ReadFloat32() (f float32, err error) + func (m *Reader) ReadFloat64() (f float64, err error) + func (m *Reader) ReadFull(p []byte) (int, error) + func (m *Reader) ReadInt() (i int, err error) + func (m *Reader) ReadInt16() (i int16, err error) + func (m *Reader) ReadInt32() (i int32, err error) + func (m *Reader) ReadInt64() (i int64, err error) + func (m *Reader) ReadInt8() (i int8, err error) + func (m *Reader) ReadIntf() (i interface{}, err error) + func (m *Reader) ReadMapHeader() (sz uint32, err error) + func (m *Reader) ReadMapKey(scratch []byte) ([]byte, error) + func (m *Reader) ReadMapKeyPtr() ([]byte, error) + func (m *Reader) ReadMapStrIntf(mp map[string]interface{}) (err error) + func (m *Reader) ReadNil() error + func (m *Reader) ReadString() (s string, err error) + func (m *Reader) ReadStringAsBytes(scratch []byte) (b []byte, err error) + func (m *Reader) ReadStringHeader() (sz uint32, err error) + func (m *Reader) ReadTime() (t time.Time, err error) + func (m *Reader) ReadUint() (u uint, err error) + func (m *Reader) ReadUint16() (u uint16, err error) + func (m *Reader) ReadUint32() (u uint32, err error) + func (m *Reader) ReadUint64() (u uint64, err error) + func (m *Reader) ReadUint8() (u uint8, err error) + func (m *Reader) Reset(r io.Reader) + func (m *Reader) Skip() error + func (r *Reader) WriteToJSON(w io.Writer) (n int64, err error) + type Sizer interface + Msgsize func() int + type Type byte + const ArrayType + const BinType + const BoolType + const Complex128Type + const Complex64Type + const ExtensionType + const Float32Type + const Float64Type + const IntType + const InvalidType + const MapType + const NilType + const StrType + const TimeType + const UintType + func NextType(b []byte) Type + func (t Type) String() string + type TypeError struct + Encoded Type + Method Type + func (t TypeError) Error() string + func (t TypeError) Resumable() bool + type UintBelowZero struct + Value int64 + func (u UintBelowZero) Error() string + func (u UintBelowZero) Resumable() bool + type UintOverflow struct + FailedBitsize int + Value uint64 + func (u UintOverflow) Error() string + func (u UintOverflow) Resumable() bool + type Unmarshaler interface + UnmarshalMsg func([]byte) ([]byte, error) + type Writer struct + func NewWriter(w io.Writer) *Writer + func NewWriterSize(w io.Writer, sz int) *Writer + func (mw *Writer) Append(b ...byte) error + func (mw *Writer) Buffered() int + func (mw *Writer) Flush() error + func (mw *Writer) Reset(w io.Writer) + func (mw *Writer) Write(p []byte) (int, error) + func (mw *Writer) WriteArrayHeader(sz uint32) error + func (mw *Writer) WriteBool(b bool) error + func (mw *Writer) WriteByte(u byte) error + func (mw *Writer) WriteBytes(b []byte) error + func (mw *Writer) WriteBytesHeader(sz uint32) error + func (mw *Writer) WriteComplex128(f complex128) error + func (mw *Writer) WriteComplex64(f complex64) error + func (mw *Writer) WriteExtension(e Extension) error + func (mw *Writer) WriteFloat32(f float32) error + func (mw *Writer) WriteFloat64(f float64) error + func (mw *Writer) WriteInt(i int) error + func (mw *Writer) WriteInt16(i int16) error + func (mw *Writer) WriteInt32(i int32) error + func (mw *Writer) WriteInt64(i int64) error + func (mw *Writer) WriteInt8(i int8) error + func (mw *Writer) WriteIntf(v interface{}) error + func (mw *Writer) WriteMapHeader(sz uint32) error + func (mw *Writer) WriteMapStrIntf(mp map[string]interface{}) (err error) + func (mw *Writer) WriteMapStrStr(mp map[string]string) (err error) + func (mw *Writer) WriteNil() error + func (mw *Writer) WriteString(s string) error + func (mw *Writer) WriteStringFromBytes(str []byte) error + func (mw *Writer) WriteStringHeader(sz uint32) error + func (mw *Writer) WriteTime(t time.Time) error + func (mw *Writer) WriteUint(u uint) error + func (mw *Writer) WriteUint16(u uint16) error + func (mw *Writer) WriteUint32(u uint32) error + func (mw *Writer) WriteUint64(u uint64) error + func (mw *Writer) WriteUint8(u uint8) error Incompatible versions in this module v2.0.0+incompatible Jan 24, 2019