random

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ModeALL           = iota // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
	ModeNoLower              // ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_
	ModeNoUpper              // abcdefghijklmnopqrstuvwxyz0123456789-_
	ModeNoNumber             // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_
	ModeNoLowerNumber        // ABCDEFGHIJKLMNOPQRSTUVWXYZ-_
	ModeNoUpperNumber        // abcdefghijklmnopqrstuvwxyz-_
	ModeNoLine               // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
	ModeNoLowerLine          // ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
	ModeNoUpperLine          // abcdefghijklmnopqrstuvwxyz0123456789
	ModeOnlyUpper            // ABCDEFGHIJKLMNOPQRSTUVWXYZ
	ModeOnlyLower            // abcdefghijklmnopqrstuvwxyz
	ModeOnlyNumber           // 0123456789
	ModeHexUpper             // 0123456789ABCDEF
	ModeHexLower             // 0123456789abcdef

	ModeLimit
)

Variables

View Source
var (
	ENoUUID       = errors.New("Unable read uuid")
	ENoUUIDKernel = errors.New("Unable read uuid from kernel")
)
View Source
var (
	ENoResult = errors.New("Unable read result")
)

Functions

func NewRandomInt added in v0.0.5

func NewRandomInt(max int) int

func NewRandomInt32 added in v0.0.5

func NewRandomInt32(max int32) int32

func NewRandomInt64 added in v0.0.5

func NewRandomInt64(max int64) int64

func NewRandomString added in v0.0.3

func NewRandomString(mode, max int) (result string)

func NewRandomTimeNanoSum added in v0.0.25

func NewRandomTimeNanoSum() int64

func NewRandomTimestamp added in v0.0.25

func NewRandomTimestamp() int64

func NewRandomUUID added in v0.0.3

func NewRandomUUID() string

func NewRandomUUIDByKernel

func NewRandomUUIDByKernel() string

func NewRandomUint added in v0.0.5

func NewRandomUint(max uint) uint

func NewRandomUint32 added in v0.0.5

func NewRandomUint32(max uint32) uint32

func NewRandomUint64 added in v0.0.5

func NewRandomUint64(max uint64) uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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