gen

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package gen contains functions for generating random base insolar types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID

func ID() insolar.ID

ID generates random id.

func IDWithPulse

func IDWithPulse(pn insolar.PulseNumber) insolar.ID

IDWithPulse generates random id with provided pulse.

func JetID

func JetID() insolar.JetID

JetID generates random jet id.

func PulseNumber

func PulseNumber() insolar.PulseNumber

PulseNumber generates random pulse number (excluding special cases).

func RecordReference added in v0.9.1

func RecordReference() insolar.Reference

RecordReference generates random record reference.

func Reference

func Reference() insolar.Reference

Reference generates random reference.

func ReferenceWithPulse added in v0.9.1

func ReferenceWithPulse(pn insolar.PulseNumber) insolar.Reference

func Signature

func Signature(size int) []byte

Signature generates random non nil bytes sequence of provided size.

func StringFromBytes

func StringFromBytes(symbols []byte, maxcount int) string

StringFromBytes generates random id with length from 0 to maxcount randomly filled by provided symbols.

func UniqueIDs

func UniqueIDs(a int) []insolar.ID

UniqueIDs generates multiple random unique IDs.

func UniqueJetIDs

func UniqueJetIDs(a int) []insolar.JetID

UniqueJetIDs generates several different jet ids

func UniqueRecordReferences added in v0.9.3

func UniqueRecordReferences(a int) []insolar.Reference

UniqueReferences generates multiple random unique References.

func UniqueReferences

func UniqueReferences(a int) []insolar.Reference

UniqueReferences generates multiple random unique References.

Types

This section is empty.

Jump to

Keyboard shortcuts

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