basictl

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const RandomNatConstraint = 32

Variables

This section is empty.

Functions

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 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 RandomDouble

func RandomDouble(rg *RandGenerator) float64

func RandomFloat

func RandomFloat(rg *RandGenerator) float32

func RandomInt

func RandomInt(rg *RandGenerator) int32

func RandomLong

func RandomLong(rg *RandGenerator) int64

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 StringRead

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

func StringReadBytes

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

func StringWrite

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

func StringWriteBytes

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

Types

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 {
	// contains filtered or unexported fields
}

func NewRandGenerator added in v1.1.0

func NewRandGenerator(r Rand) *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

Jump to

Keyboard shortcuts

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