Versions in this module Expand all Collapse all v0 v0.9.0 May 25, 2017 Changes in this version + const IDVectorLong + const TagGzipPacked + var ErrMessageTooShort = errors.New("message too short") + var ErrTrailingData = errors.New("unexpected trailing data") + var ErrUnexpectedCommand = errors.New("unexpected command") + func BareBytes(o Object) []byte + func Bytes(o Object) []byte + func BytesOf(ww WritableToWriter) []byte + func CmdOfPayload(b []byte) uint32 + func Name(o Object) string + func Pretty(o Object) string + func ReadBare(o Object, data []byte) error + type Object interface + Cmd func() uint32 + ReadBareFrom func(r *Reader) + WriteBareTo func(w *Writer) + type Reader struct + func DecodeObject(r *Reader) *Reader + func NewReader(data []byte) *Reader + func (r *Reader) Cmd() uint32 + func (r *Reader) Err() error + func (r *Reader) ExpectCmd(cmds ...uint32) bool + func (r *Reader) ExpectEOF() + func (r *Reader) Fail(err error) + func (r *Reader) PeekCmd() uint32 + func (r *Reader) PeekUint32() uint32 + func (r *Reader) ReadBigInt() *big.Int + func (r *Reader) ReadBlob() []byte + func (r *Reader) ReadBlobLen() (int, int) + func (r *Reader) ReadBool() bool + func (r *Reader) ReadByte() byte + func (r *Reader) ReadCmd() uint32 + func (r *Reader) ReadFloat64() float64 + func (r *Reader) ReadFull(b []byte) + func (r *Reader) ReadInt() int + func (r *Reader) ReadN(n int) []byte + func (r *Reader) ReadString() string + func (r *Reader) ReadTimeSec32() time.Time + func (r *Reader) ReadToEnd() []byte + func (r *Reader) ReadUint128(buf []byte) bool + func (r *Reader) ReadUint32() uint32 + func (r *Reader) ReadUint64() uint64 + func (r *Reader) ReadVectorLong() []uint64 + func (r *Reader) Reset(data []byte) + func (r *Reader) Skip(n int) + func (r *Reader) StartInnerCmd() uint32 + func (r *Reader) TryReadByte() (byte, bool) + func (r *Reader) TryReadUint24() (uint32, bool) + func (r *Reader) TryReadUint32() (uint32, bool) + func (r *Reader) TryReadUint64() (uint64, bool) + type Schema struct + Factory func(uint32) Object + func (schema *Schema) DescribeCmd(cmd uint32) string + func (schema *Schema) DescribeCmdOfPayload(raw []byte) string + func (schema *Schema) MustReadBoxedObject(raw []byte) Object + func (schema *Schema) ReadBoxedObject(raw []byte) (Object, error) + func (schema *Schema) ReadBoxedObjectFrom(r *Reader) Object + func (schema *Schema) ReadBoxedObjectNoEOFCheck(raw []byte) (Object, error) + func (schema *Schema) ReadLimitedBoxedObject(raw []byte, cmds ...uint32) (Object, error) + func (schema *Schema) ReadLimitedBoxedObjectFrom(r *Reader, cmds ...uint32) Object + func (schema *Schema) ReadLimitedBoxedObjectNoEOFCheck(raw []byte, cmds ...uint32) (Object, error) + type WritableToWriter interface + WriteTo func(w *Writer) + type Writer struct + func NewWriter() *Writer + func NewWriterCmd(cmd uint32) *Writer + func (w *Writer) Bytes() []byte + func (w *Writer) Clear() + func (w *Writer) PaddingTo(bs int) int + func (w *Writer) Write(v []byte) + func (w *Writer) WriteBigInt(v *big.Int) + func (w *Writer) WriteBlob(v []byte) + func (w *Writer) WriteBlobLen(v int) int + func (w *Writer) WriteBool(v bool) + func (w *Writer) WriteByte(v byte) + func (w *Writer) WriteCmd(v uint32) + func (w *Writer) WriteFloat64(v float64) + func (w *Writer) WriteInt(v int) + func (w *Writer) WriteString(s string) + func (w *Writer) WriteTimeSec32(tm time.Time) + func (w *Writer) WriteUint128(v []byte) + func (w *Writer) WriteUint24(v uint32) + func (w *Writer) WriteUint32(v uint32) + func (w *Writer) WriteUint64(v uint64) + func (w *Writer) WriteVectorLong(v []uint64) + func (w *Writer) ZeroPad(n int)