Documentation ¶
Index ¶
- Variables
- func DecodeUnifiedVarInt(buffer []byte, offset int) (int64, int)
- func DecodeUnifiedVarUint(buffer []byte, offset int) (uint64, int)
- func DecodeVarInt(buffer []byte, offset int) (int64, int)
- func DecodeVarUint(buffer []byte, offset int) (uint64, int)
- func EncodeUnifiedVarInt(value int64, buffer []byte, offset int) int
- func EncodeUnifiedVarIntSize(value int64) int
- func EncodeUnifiedVarUint(value uint64, buffer []byte, offset int) int
- func EncodeUnifiedVarUintSize(value uint64) int
- func EncodeVarInt(value int64, buffer []byte, offset int) int
- func EncodeVarIntSize(value int64) int
- func EncodeVarUint(value uint64, buffer []byte, offset int) int
- func EncodeVarUintSize(value uint64) int
- type Decoder
- func (d *Decoder) CheckBufferSize(size int) bool
- func (d *Decoder) DecodeBinary() ([]byte, int)
- func (d *Decoder) DecodeByte() (uint8, int)
- func (d *Decoder) DecodeRawBinary(size int) ([]byte, int)
- func (d *Decoder) DecodeUintLE(size int) (uint64, int)
- func (d *Decoder) DecodeVarInt() (int64, int)
- func (d *Decoder) DecodeVarUint() (uint64, int)
- func (d *Decoder) DecodeWireID() (WireID, int)
- func (d *Decoder) EOF() bool
- func (d *Decoder) SetOffset(offset int)
- type Encoder
- func (e *Encoder) CheckBufferSize(size int) bool
- func (e *Encoder) EncodeBinary(value []byte) int
- func (e *Encoder) EncodeByte(value uint8) int
- func (e *Encoder) EncodeFloatLE(value float64, size int) int
- func (e *Encoder) EncodeIntLE(value int64, size int) int
- func (e *Encoder) EncodeRawBinary(value []byte) int
- func (e *Encoder) EncodeUintLE(value uint64, size int) int
- func (e *Encoder) EncodeVarInt(value int64) int
- func (e *Encoder) EncodeVarUint(value uint64) int
- type Field
- func (f *Field) Blob() []byte
- func (f *Field) Bytes() []byte
- func (f *Field) FieldID() uint64
- func (f *Field) Int() int64
- func (f *Field) Name() string
- func (f *Field) ReadFrom(buffer []byte, offset int) int
- func (f *Field) String() string
- func (f *Field) Uint() uint64
- func (f *Field) WireID() WireID
- func (f *Field) WithName(name string) *Field
- func (f *Field) WriteTo(buffer []byte, offset int) int
- type FieldValue
- type FixedLengthType
- type MemoryType
- type WireID
- type WireType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCertletErrorBase = errors.New("certlet: base error") ErrDataTypeNotSupport = errors.New("certlet: data type not support") )
Functions ¶
func EncodeUnifiedVarIntSize ¶
func EncodeVarIntSize ¶
func EncodeVarUintSize ¶
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func (*Decoder) CheckBufferSize ¶
func (*Decoder) DecodeBinary ¶
func (*Decoder) DecodeByte ¶
func (*Decoder) DecodeVarInt ¶
func (*Decoder) DecodeVarUint ¶
func (*Decoder) DecodeWireID ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func (*Encoder) CheckBufferSize ¶
func (*Encoder) EncodeBinary ¶
func (*Encoder) EncodeByte ¶
func (*Encoder) EncodeRawBinary ¶
func (*Encoder) EncodeVarInt ¶
func (*Encoder) EncodeVarUint ¶
type FieldValue ¶
type FixedLengthType ¶
type FixedLengthType uint8
const ( FixedLengthTypeNull FixedLengthType = 0x00 FixedLengthTypeInteger FixedLengthType = 0x40 FixedLengthTypeFloat FixedLengthType = 0x80 FixedLengthTypeTimestamp FixedLengthType = 0xc0 )
type MemoryType ¶
type MemoryType int
const ( MemoryTypeUint MemoryType = iota MemoryTypeInt MemoryTypeBigInt MemoryTypeFloat MemoryTypeBlob )
Click to show internal directories.
Click to hide internal directories.