tl

package
v0.0.0-...-da90e6b Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CRC

func CRC(schema string) uint32

func FromBytes

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

func Hash

func Hash(key any) ([]byte, 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