basictl

package
v1.2.30 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Code generated by vktl/cmd/tlgen2; DO NOT EDIT.

Code generated by vktl/cmd/tlgen2; DO NOT EDIT.

Index

Constants

View Source
const RandomNatConstraint = 32

Variables

This section is empty.

Functions

func BasicTL2Content added in v1.2.18

func BasicTL2Content(headerComment string, packageName string) string

func BasicTLContent added in v1.2.18

func BasicTLContent(headerComment string, packageName string) string

func ByteBoolReadTL2 added in v1.2.18

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

func ByteBoolWriteTL2 added in v1.2.18

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

func ByteReadTL2 added in v1.1.25

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

func ByteWriteTL2 added in v1.2.18

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 MaybeBoolReadTL2 added in v1.2.7

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

func MaybeBoolWriteTL2 added in v1.2.7

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 added in v1.2.17

func RandomByte(rg *RandGenerator) byte

func RandomDouble

func RandomDouble(rg *RandGenerator) float64

func RandomFieldMask added in v1.2.21

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 added in v1.2.21

func RandomSize(rg *RandGenerator) uint32

func RandomString

func RandomString(rg *RandGenerator) string

func RandomStringBytes

func RandomStringBytes(rg *RandGenerator) []byte

func RandomUint added in v1.1.0

func RandomUint(rg *RandGenerator) uint32

func ReadBool

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

func SkipFixedSizedValue added in v1.2.18

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

func SkipSizedValue added in v1.2.18

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 added in v1.1.25

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

func StringReadTL2Bytes added in v1.2.30

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 added in v1.1.25

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

func StringWriteTL2Bytes added in v1.2.30

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

func TL2CalculateSize added in v1.1.25

func TL2CalculateSize(l int) int

func TL2Error added in v1.1.25

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

func TL2ExpectedNonZeroError added in v1.1.25

func TL2ExpectedNonZeroError() error

func TL2ExpectedZeroError added in v1.1.25

func TL2ExpectedZeroError() error

func TL2ParseSize added in v1.1.25

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

func TL2ReadSize added in v1.1.25

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

func TL2UnexpectedByteError added in v1.1.25

func TL2UnexpectedByteError(actualByte, expectedByte byte) error

func TL2WriteSize added in v1.1.25

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

Types

type JSONReadContext added in v1.2.18

type JSONReadContext struct {
	LegacyTypeNames bool

	IsTL2 bool
}

type JSONWriteContext added in v1.2.11

type JSONWriteContext struct {
	LegacyTypeNames bool
	Short           bool

	IsTL2 bool
}

type JsonLexer added in v1.1.0

type JsonLexer = jlexer.Lexer

type Rand

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

type RandGenerator added in v1.1.0

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

func NewRandGenerator added in v1.1.0

func NewRandGenerator(r Rand) *RandGenerator

func NewRandGeneratorWithContext added in v1.2.21

func NewRandGeneratorWithContext(r Rand, ctx RandgeneratorContext) *RandGenerator

func (*RandGenerator) DecreaseDepth added in v1.1.0

func (rg *RandGenerator) DecreaseDepth()

func (*RandGenerator) IncreaseDepth added in v1.1.0

func (rg *RandGenerator) IncreaseDepth()

func (*RandGenerator) LimitValue added in v1.1.0

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

type RandgeneratorContext added in v1.2.21

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

type TL2ReadContext added in v1.2.1

type TL2ReadContext struct{}

type TL2WriteContext added in v1.2.1

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