tl

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 59

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSerializeBufferSize = 1024
View Source
var Logger = func(a ...any) {}

Functions

func CRC added in v1.8.0

func CRC(schema string) uint32

func FromBytes added in v1.5.0

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

func Hash added in v1.8.0

func Hash(key any) ([]byte, error)

func Parse added in v1.5.0

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

func Register added in v1.5.0

func Register(typ any, tl string) uint32

func RemapBufferAsSlice added in v1.11.0

func RemapBufferAsSlice(buf *bytes.Buffer, from int)

func Serialize added in v1.5.0

func Serialize(v Serializable, boxed bool, bufOpt ...*bytes.Buffer) ([]byte, error)

func ToBytes added in v1.0.0

func ToBytes(buf []byte) []byte

func ToBytesToBuffer added in v1.11.0

func ToBytesToBuffer(buf *bytes.Buffer, data []byte)

Types

type ParseableTL added in v1.11.0

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

type Raw added in v1.5.0

type Raw []byte

type Serializable added in v1.5.0

type Serializable interface{}

type SerializableTL added in v1.11.0

type SerializableTL interface {
	Serialize(buf *bytes.Buffer) error
}

type TL added in v1.5.0

type TL interface {
	ParseableTL
	SerializableTL
}

Jump to

Keyboard shortcuts

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