Documentation ¶
Overview ¶
Package testrand implements generating random base types for testing.
Index ¶
- func Bytes(size memory.Size) []byte
- func BytesInt(size int) []byte
- func Float64n(n int64) float64
- func Int63n(n int64) int64
- func Intn(n int) int
- func Key() storj.Key
- func NodeID() storj.NodeID
- func Nonce() storj.Nonce
- func PieceID() storj.PieceID
- func Read(data []byte)
- func Reader() io.Reader
- func SegmentID(size int) storj.SegmentID
- func SerialNumber() storj.SerialNumber
- func StreamID(size int) storj.StreamID
- func UUID() uuid.UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float64n ¶ added in v0.18.0
Float64n returns floating point pseudo-random number in [-n,0] || [0,n] based on the sign of the input
func Int63n ¶
Int63n returns, as an int64, a non-negative pseudo-random number in [0,n) from the default Source. It panics if n <= 0.
func Intn ¶
Intn returns, as an int, a non-negative pseudo-random number in [0,n) from the default Source. It panics if n <= 0.
func SerialNumber ¶
func SerialNumber() storj.SerialNumber
SerialNumber creates a random serial number.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.