Versions in this module Expand all Collapse all v1 v1.0.0 Sep 30, 2023 Changes in this version + const CrcFalse + const CrcNull + const CrcTrue + const CrcVector + const DoubleLen + const FuckingMagicNumber + const Int128Len + const Int256Len + const LongLen + const WordLen + func Decode(data []byte, res any) error + func Marshal(v any) ([]byte, error) + func RegisterEnums(enums ...Object) + func RegisterObjects(obs ...Object) + func UnwrapNativeTypes(in Object) any + type Decoder struct + func NewDecoder(r io.Reader) (*Decoder, error) + func (d *Decoder) DumpWithoutRead() ([]byte, error) + func (d *Decoder) ExpectTypesInInterface(types ...reflect.Type) + func (d *Decoder) GetRestOfMessage() ([]byte, error) + func (d *Decoder) PopBool() bool + func (d *Decoder) PopCRC() uint32 + func (d *Decoder) PopDouble() float64 + func (d *Decoder) PopInt() int32 + func (d *Decoder) PopLong() int64 + func (d *Decoder) PopMessage() []byte + func (d *Decoder) PopNull() + func (d *Decoder) PopRawBytes(size int) []byte + func (d *Decoder) PopUint() uint32 + func (d *Decoder) PopVector(as reflect.Type) any + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) CheckErr() error + func (e *Encoder) PutBool(v bool) + func (e *Encoder) PutCRC(v uint32) + func (e *Encoder) PutDouble(v float64) + func (e *Encoder) PutInt(v int32) + func (e *Encoder) PutLong(v int64) + func (e *Encoder) PutMessage(msg []byte) + func (e *Encoder) PutRawBytes(b []byte) + func (e *Encoder) PutString(msg string) + func (e *Encoder) PutUint(v uint32) + func (e *Encoder) PutVector(v any) + type ErrMustParseSlicesExplicitly null + func (e *ErrMustParseSlicesExplicitly) Error() string + type ErrRegisteredObjectNotFound struct + Crc uint32 + Data []byte + func (e *ErrRegisteredObjectNotFound) Error() string + type ErrorPartialWrite struct + Has int + Want int + func (e *ErrorPartialWrite) Error() string + type FlagIndexGetter interface + FlagIndex func() int + type Int128 struct + func NewInt128() *Int128 + func RandomInt128() *Int128 + func (i *Int128) MarshalTL(e *Encoder) error + func (i *Int128) UnmarshalTL(d *Decoder) error + type Int256 struct + func NewInt256() *Int256 + func RandomInt256() *Int256 + func (i *Int256) MarshalTL(e *Encoder) error + func (i *Int256) UnmarshalTL(d *Decoder) error + type Marshaler interface + MarshalTL func(*Encoder) error + type Object interface + CRC func() uint32 + func DecodeUnknownObject(data []byte, expectNextTypes ...reflect.Type) (Object, error) + type PseudoFalse null + func (*PseudoFalse) CRC() uint32 + type PseudoNil null + func (*PseudoNil) CRC() uint32 + func (*PseudoNil) Unwrap() any + type PseudoTrue null + func (*PseudoTrue) CRC() uint32 + type Unmarshaler interface + UnmarshalTL func(*Decoder) error + type WrappedSlice struct + func (*WrappedSlice) CRC() uint32 + func (w *WrappedSlice) Unwrap() any