basictl

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Code generated by tl2gen; DO NOT EDIT.

Code generated by tl2gen; DO NOT EDIT.

Index

Constants

View Source
const RandomNatConstraint = 32

Variables

This section is empty.

Functions

func ByteBoolReadTL2

func ByteBoolReadTL2(r []byte, b *bool) (_ []byte, err error)

func ByteBoolWriteTL2

func ByteBoolWriteTL2(w []byte, b bool) []byte

func ByteReadTL2

func ByteReadTL2(r []byte, b *byte) ([]byte, error)

func ByteWriteTL2

func ByteWriteTL2(w []byte, b byte) []byte

func CheckLengthSanity

func CheckLengthSanity(r []byte, natParam uint32, minObjectSize uint32) error

func DoubleRead

func DoubleRead(r []byte, dst *float64) ([]byte, error)

func DoubleWrite

func DoubleWrite(w []byte, v float64) []byte

func FloatRead

func FloatRead(r []byte, dst *float32) ([]byte, error)

func FloatWrite

func FloatWrite(w []byte, v float32) []byte

func IntRead

func IntRead(r []byte, dst *int32) ([]byte, error)

func IntWrite

func IntWrite(w []byte, v int32) []byte

func JSONAddCommaIfNeeded

func JSONAddCommaIfNeeded(w []byte) []byte

func JSONWriteBool

func JSONWriteBool(w []byte, v bool) []byte

func JSONWriteFloat32

func JSONWriteFloat32(w []byte, v float32) []byte

func JSONWriteFloat64

func JSONWriteFloat64(w []byte, v float64) []byte

func JSONWriteInt32

func JSONWriteInt32(w []byte, v int32) []byte

func JSONWriteInt64

func JSONWriteInt64(w []byte, v int64) []byte

func JSONWriteString

func JSONWriteString(w []byte, s string) []byte

func JSONWriteStringBytes

func JSONWriteStringBytes(w []byte, s []byte) []byte

NOTE: keep in sync with string above.

func JSONWriteUint32

func JSONWriteUint32(w []byte, v uint32) []byte

func JSONWriteUint64

func JSONWriteUint64(w []byte, v uint64) []byte

func LongRead

func LongRead(r []byte, dst *int64) ([]byte, error)

func LongWrite

func LongWrite(w []byte, v int64) []byte

func MaybeBoolWriteTL2

func MaybeBoolWriteTL2(w []byte, b bool) []byte

func NatPeekTag

func NatPeekTag(r []byte) (uint32, error)

func NatRead

func NatRead(r []byte, dst *uint32) ([]byte, error)

func NatReadExactTag

func NatReadExactTag(r []byte, tag uint32) ([]byte, error)

func NatReadTag

func NatReadTag(r []byte) (uint32, []byte, error)

func NatWrite

func NatWrite(w []byte, v uint32) []byte

func RandomByte

func RandomByte(rg *RandGenerator) byte

func RandomDouble

func RandomDouble(rg *RandGenerator) float64

func RandomFieldMask

func RandomFieldMask(rg *RandGenerator, bitMask uint32) uint32

func RandomFloat

func RandomFloat(rg *RandGenerator) float32

func RandomInt

func RandomInt(rg *RandGenerator) int32

func RandomLong

func RandomLong(rg *RandGenerator) int64

func RandomSize

func RandomSize(rg *RandGenerator) uint32

func RandomString

func RandomString(rg *RandGenerator) string

func RandomStringBytes

func RandomStringBytes(rg *RandGenerator) []byte

func RandomUint

func RandomUint(rg *RandGenerator) uint32

func ReadBool

func ReadBool(r []byte, v *bool, falseTag uint32, trueTag uint32) ([]byte, error)

func SkipFixedSizedValue

func SkipFixedSizedValue(r []byte, l int) (_ []byte, err error)

func SkipSizedValue

func SkipSizedValue(r []byte) (_ []byte, err error)

func StringRead

func StringRead(r []byte, dst *string) ([]byte, error)

func StringReadBytes

func StringReadBytes(r []byte, dst *[]byte) ([]byte, error)

func StringReadTL2

func StringReadTL2(r []byte, dst *string) (_ []byte, err error)

func StringReadTL2Bytes

func StringReadTL2Bytes(r []byte, dst *[]byte) (_ []byte, err error)

func StringWrite

func StringWrite(w []byte, v string) []byte

func StringWriteBytes

func StringWriteBytes(w []byte, v []byte) []byte

func StringWriteTL2

func StringWriteTL2(w []byte, v string) []byte

func StringWriteTL2Bytes

func StringWriteTL2Bytes(w []byte, v []byte) []byte

func TL2CalculateSize

func TL2CalculateSize(l int) int

func TL2ElementCountError

func TL2ElementCountError(elementCount int, r []byte) error

func TL2Error

func TL2Error(format string, a ...any) error

func TL2ExpectedNonZeroError

func TL2ExpectedNonZeroError() error

func TL2ExpectedZeroError

func TL2ExpectedZeroError() error

func TL2ParseSize

func TL2ParseSize(r []byte) ([]byte, int, error)

func TL2PutSize

func TL2PutSize(w []byte, l int) int

w have at least 9 bytes length

func TL2ReadSize

func TL2ReadSize(r []byte, l *int) (_ []byte, err error)

func TL2UnexpectedByteError

func TL2UnexpectedByteError(actualByte, expectedByte byte) error

func TL2WriteSize

func TL2WriteSize(w []byte, l int) []byte

func VectorBitContentReadTL2

func VectorBitContentReadTL2(w []byte, vec []bool) (_ []byte, err error)

func VectorBitContentWriteTL2

func VectorBitContentWriteTL2(w []byte, vec []bool) []byte

Types

type JSONReadContext

type JSONReadContext struct {
	LegacyTypeNames bool

	IsTL2 bool
}

type JSONWriteContext

type JSONWriteContext struct {
	LegacyTypeNames bool
	Short           bool

	IsTL2 bool
}

type JsonLexer

type JsonLexer = jlexer.Lexer

type Rand

type Rand interface {
	Uint32() uint32
	Int31() int32
	Int63() int64
	NormFloat64() float64
}

type RandGenerator

type RandGenerator struct {
	SizeHandler      func(generatedValue uint32) uint32
	FieldMaskHandler func(generatedValue uint32, bitMask uint32) uint32
	// contains filtered or unexported fields
}

func NewRandGenerator

func NewRandGenerator(r Rand) *RandGenerator

func NewRandGeneratorWithContext

func NewRandGeneratorWithContext(r Rand, ctx RandgeneratorContext) *RandGenerator

func (*RandGenerator) DecreaseDepth

func (rg *RandGenerator) DecreaseDepth()

func (*RandGenerator) IncreaseDepth

func (rg *RandGenerator) IncreaseDepth()

func (*RandGenerator) LimitValue

func (rg *RandGenerator) LimitValue(value uint32) uint32

type RandgeneratorContext

type RandgeneratorContext struct {
	SizeHandler      func(generatedValue uint32) uint32
	FieldMaskHandler func(generatedValue uint32, bitMask uint32) uint32
}

type TL2ReadContext

type TL2ReadContext struct{}

type TL2WriteContext

type TL2WriteContext struct {
	// buffer for allocations of objects sizes
	SizeBuffer []int
}

Jump to

Keyboard shortcuts

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