gen

package
v0.9.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 3 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() (id insolar.ID)

ID generates random id.

func IDWithPulse

func IDWithPulse(pn insolar.PulseNumber) (id insolar.ID)

IDWithPulse generates random id with provided pulse.

func JetID

func JetID() (jetID insolar.JetID)

JetID generates random jet id.

func PulseNumber

func PulseNumber() (pn insolar.PulseNumber)

PulseNumber generates random pulse number (excluding special cases).

func Reference

func Reference() insolar.Reference

Reference generates random 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 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