filler

package
v0.0.0-...-5f61169 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: LGPL-2.1 Imports: 2 Imported by: 2

Documentation

Overview

Package filler can fill objects based on a provided data source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filler

type Filler struct {
	// contains filtered or unexported fields
}

Filler can be used to fill objects from a data source.

func NewFiller

func NewFiller(data []byte) *Filler

NewFiller creates a new Filler.

func (*Filler) BigInt16

func (f *Filler) BigInt16() *big.Int

BigInt16 returns a new big int in [0, 2^16).

func (*Filler) BigInt256

func (f *Filler) BigInt256() *big.Int

BigInt256 returns a new big int in [0, 2^256).

func (*Filler) BigInt32

func (f *Filler) BigInt32() *big.Int

BigInt32 returns a new big int in [0, 2^32).

func (*Filler) BigInt64

func (f *Filler) BigInt64() *big.Int

BigInt64 returns a new big int in [0, 2^64).

func (*Filler) Bool

func (f *Filler) Bool() bool

Bool returns a new bool.

func (*Filler) Byte

func (f *Filler) Byte() byte

Byte returns a new byte.

func (*Filler) ByteSlice

func (f *Filler) ByteSlice(items int) []byte

ByteSlice returns a byteslice with `items` values.

func (*Filler) ByteSlice256

func (f *Filler) ByteSlice256() []byte

ByteSlice256 returns a byteslice with 0..255 values.

func (*Filler) GasInt

func (f *Filler) GasInt() *big.Int

GasInt returns a new big int to be used as a gas value. With probability 254/255 its in [0, 20.000.000]. With probability 1/255 its in [0, 2^32].

func (*Filler) MemInt

func (f *Filler) MemInt() *big.Int

MemInt returns a new big int to be used as a memory or offset value. With probability 252/255 its in [0, 256]. With probability 1/255 its in [0, 2^32]. With probability 1/255 its in [0, 2^64]. With probability 1/255 its in [0, 2^256].

func (*Filler) Read

func (f *Filler) Read(b []byte) (n int, err error)

Read implements the io.Reader interface.

func (*Filler) Reset

func (f *Filler) Reset()

Reset resets a filler.

func (*Filler) Uint16

func (f *Filler) Uint16() uint16

Uint16 returns a new uint16.

func (*Filler) Uint32

func (f *Filler) Uint32() uint32

Uint32 returns a new uint32.

func (*Filler) Uint64

func (f *Filler) Uint64() uint64

Uint64 returns a new uint64.

func (*Filler) UsedUp

func (f *Filler) UsedUp() bool

UsedUp returns wether all bytes from the source have been used.

Jump to

Keyboard shortcuts

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