tl

package
v0.0.0-...-bcde84c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BoolFalse = tlCRC("boolFalse = Bool")
View Source
var BoolTrue = tlCRC("boolTrue = Bool")
View Source
var Logger = func(a ...any) {}

Functions

func FromBytes

func FromBytes(data []byte) (loaded []byte, buffer []byte, err error)

func Parse

func Parse(v Serializable, data []byte, boxed bool, names ...string) (_ []byte, err error)

func Register

func Register(typ any, tl string) uint32

func Serialize

func Serialize(v Serializable, boxed bool) ([]byte, error)

func ToBytes

func ToBytes(buf []byte) []byte

Types

type Raw

type Raw []byte

type Serializable

type Serializable interface{}

type TL

type TL interface {
	Parse(data []byte) ([]byte, error)
	Serialize() ([]byte, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL