Documentation ¶
Index ¶
- Variables
- func Marshal(v Encodee) (bs []byte, err error)
- func MarshalAppend(v Encodee, buffer []byte) (bs []byte, err error)
- func Unmarshal(bs []byte, v Decodee) (err error)
- type Decodee
- type Decoder
- func (d *Decoder) Bool() (v bool, err error)
- func (d *Decoder) Bytes(in *[]byte) (err error)
- func (d *Decoder) Decode(v Decodee) (err error)
- func (d *Decoder) Float32() (v float32, err error)
- func (d *Decoder) Float64() (v float64, err error)
- func (d *Decoder) Int() (v int, err error)
- func (d *Decoder) Int16() (v int16, err error)
- func (d *Decoder) Int32() (v int32, err error)
- func (d *Decoder) Int64() (v int64, err error)
- func (d *Decoder) Int8() (v int8, err error)
- func (d *Decoder) String() (str string, err error)
- func (d *Decoder) Uint() (v uint, err error)
- func (d *Decoder) Uint16() (v uint16, err error)
- func (d *Decoder) Uint32() (v uint32, err error)
- func (d *Decoder) Uint64() (v uint64, err error)
- func (d *Decoder) Uint8() (v uint8, err error)
- type Encodee
- type Encoder
- func (e *Encoder) Bool(v bool) (err error)
- func (e *Encoder) Bytes(v []byte) (err error)
- func (e *Encoder) Encode(v Encodee) (err error)
- func (e *Encoder) Float32(v float32) (err error)
- func (e *Encoder) Float64(v float64) (err error)
- func (e *Encoder) Int(v int) (err error)
- func (e *Encoder) Int16(v int16) (err error)
- func (e *Encoder) Int32(v int32) (err error)
- func (e *Encoder) Int64(v int64) (err error)
- func (e *Encoder) Int8(v int8) (err error)
- func (e *Encoder) String(v string) (err error)
- func (e *Encoder) Uint(v uint) (err error)
- func (e *Encoder) Uint16(v uint16) (err error)
- func (e *Encoder) Uint32(v uint32) (err error)
- func (e *Encoder) Uint64(v uint64) (err error)
- func (e *Encoder) Uint8(v uint8) (err error)
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyBytes are returned when inbound bytes are empty during decode ErrEmptyBytes = errors.New("cannot decode, inbound bytes are empty") // ErrInvalidLength is returned when a byteslice has an invalid length for it's desired primitive ErrInvalidLength = errors.New("invalid length") // ErrIsClosed is returned when an action is attempted on a closed instance ErrIsClosed = errors.New("cannot perform action on closed instance") )
Functions ¶
func MarshalAppend ¶
MarshalAppend will encode a value to a provided slice
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder helps to Marshal data
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder helps to Marshal data
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader manages the writing of enkodo output
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer manages the writing of enkodo output
func (*Writer) Reset ¶
func (w *Writer) Reset()
Reset will reset the underlying bytes of the Encoder
Source Files ¶
Click to show internal directories.
Click to hide internal directories.