tl

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 15 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 RegisterAllowedGroup added in v1.15.0

func RegisterAllowedGroup(name string, names ...string)

RegisterAllowedGroup - register an alias for a group of types to use in tl tags in [brackets] In case the name is already registered, types will be appended

func RegisterWithFabric added in v1.14.0

func RegisterWithFabric(typ any, tl string, fab func() reflect.Value) 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 ToBytesToBuffer added in v1.11.0

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

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