Documentation ¶
Index ¶
- type Decoder
- func (d *Decoder) AsBool(offset int) (bool, int, error)
- func (d *Decoder) AsByte(offset int) (byte, int, error)
- func (d *Decoder) AsComplex128(offset int) (complex128, int, error)
- func (d *Decoder) AsComplex64(offset int) (complex64, int, error)
- func (d *Decoder) AsDateTime(offset int) (time.Time, int, error)
- func (d *Decoder) AsFloat32(offset int) (float32, int, error)
- func (d *Decoder) AsFloat64(offset int) (float64, int, error)
- func (d *Decoder) AsInt(offset int) (int, int, error)
- func (d *Decoder) AsInt16(offset int) (int16, int, error)
- func (d *Decoder) AsInt32(offset int) (int32, int, error)
- func (d *Decoder) AsInt64(offset int) (int64, int, error)
- func (d *Decoder) AsInt8(offset int) (int8, int, error)
- func (d *Decoder) AsRune(offset int) (rune, int, error)
- func (d *Decoder) AsString(offset int) (string, int, error)
- func (d *Decoder) AsStringBytes(offset int) ([]byte, int, error)
- func (d *Decoder) AsUint(offset int) (uint, int, error)
- func (d *Decoder) AsUint16(offset int) (uint16, int, error)
- func (d *Decoder) AsUint32(offset int) (uint32, int, error)
- func (d *Decoder) AsUint64(offset int) (uint64, int, error)
- func (d *Decoder) AsUint8(offset int) (uint8, int, error)
- func (d *Decoder) CheckStructHeader(fieldNum, offset int) (int, error)
- func (d *Decoder) IsCodeNil(offset int) bool
- func (d *Decoder) Len() int
- func (d *Decoder) MapLength(offset int) (int, int, error)
- func (d *Decoder) SliceLength(offset int) (int, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder holds an encoded bytes array and has methods for encoding.
func NewDecoder ¶
NewDecoder creates a new Decoder for deserialization.
func (*Decoder) AsComplex128 ¶
func (d *Decoder) AsComplex128(offset int) (complex128, int, error)
AsComplex128 checks codes and returns the got bytes as complex128
func (*Decoder) AsComplex64 ¶
AsComplex64 checks codes and returns the got bytes as complex64
func (*Decoder) AsDateTime ¶
AsDateTime checks codes and returns the got bytes as time.Time
func (*Decoder) AsStringBytes ¶ added in v0.3.0
func (*Decoder) CheckStructHeader ¶
CheckStructHeader checks if fieldNum matches the number of fields on the data.
Click to show internal directories.
Click to hide internal directories.