tl

package
v0.0.0-...-627d07a Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSerializeBufferSize = 1024
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) (_ []byte, err error)

func Register

func Register(typ any, tl string) uint32

func RemapBufferAsSlice

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

func Serialize

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

func ToBytes

func ToBytes(buf []byte) []byte

func ToBytesToBuffer

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

Types

type ParseableTL

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

type Raw

type Raw []byte

type Serializable

type Serializable interface{}

type SerializableTL

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

type TL

type TL interface {
	ParseableTL
	SerializableTL
}

Jump to

Keyboard shortcuts

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