Documentation
¶
Index ¶
- type Reader
- func (r *Reader) Error() error
- func (r *Reader) ReadBool() (bool, error)
- func (r *Reader) ReadByte() (byte, error)
- func (r *Reader) ReadBytes() ([]byte, error)
- func (r *Reader) ReadFloat32() (float32, error)
- func (r *Reader) ReadFloat64() (float64, error)
- func (r *Reader) ReadInt8() (int8, error)
- func (r *Reader) ReadInt16() (int16, error)
- func (r *Reader) ReadInt32() (int32, error)
- func (r *Reader) ReadInt64() (int64, error)
- func (r *Reader) ReadString() (string, error)
- func (r *Reader) ReadUint8() (uint8, error)
- func (r *Reader) ReadUint16() (uint16, error)
- func (r *Reader) ReadUint32() (uint32, error)
- func (r *Reader) ReadUint64() (uint64, error)
- func (r *Reader) ReadUvarint() (uint64, error)
- func (r *Reader) ReadVarint() (int64, error)
- func (r *Reader) SetError(err error)
- type Writer
- func (w *Writer) Error() error
- func (w *Writer) Flush() error
- func (w *Writer) SetError(err error)
- func (w *Writer) WriteBool(t bool) error
- func (w *Writer) WriteByte(x byte) error
- func (w *Writer) WriteBytes(b []byte) error
- func (w *Writer) WriteFloat32(f float32) error
- func (w *Writer) WriteFloat64(f float64) error
- func (w *Writer) WriteInt8(x int8) error
- func (w *Writer) WriteInt16(x int16) error
- func (w *Writer) WriteInt32(x int32) error
- func (w *Writer) WriteInt64(x int64) error
- func (w *Writer) WriteString(s string) error
- func (w *Writer) WriteUint8(x uint8) error
- func (w *Writer) WriteUint16(x uint16) error
- func (w *Writer) WriteUint32(x uint32) error
- func (w *Writer) WriteUint64(x uint64) error
- func (w *Writer) WriteUvarint(x uint64) error
- func (w *Writer) WriteVarint(x int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader for reading snapbits
func (*Reader) ReadFloat32 ¶
ReadFloat32 reads a float32
func (*Reader) ReadFloat64 ¶
ReadFloat64 reads a float64
func (*Reader) ReadUvarint ¶
ReadUvarint reads a uvarint
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer for write stuff
func (*Writer) SetError ¶ added in v0.3.0
SetError allows for setting a custom user error, which will then be returned from all further Writer.Set*() calls. This operation is ignored if an error has already been assigned to Writer.
func (*Writer) WriteFloat32 ¶
WriteFloat32 writes a float32
func (*Writer) WriteFloat64 ¶
WriteFloat64 writes a float64
func (*Writer) WriteString ¶
WriteString writes a string
func (*Writer) WriteUint16 ¶
WriteUint16 writes a uint16
func (*Writer) WriteUint32 ¶
WriteUint32 writes a uint32
func (*Writer) WriteUint64 ¶
WriteUint64 writes a uint64
func (*Writer) WriteUvarint ¶
WriteUvarint writes a uvarint
func (*Writer) WriteVarint ¶
WriteVarint writes a varint
Click to show internal directories.
Click to hide internal directories.