Documentation
¶
Overview ¶
Package isotope is a Go utility library that generates randomized data.
Index ¶
- Constants
- func Email() string
- func Int64(maxInt int64) int64
- func Password() string
- func SecureInt64(maxInt int64) (int64, error)
- func SecureString(n int, allowLowerAlpha bool, allowUpperAlpha bool, allowNumeric bool) (string, error)
- func String(n int, allowLowerAlpha bool, allowUpperAlpha bool, allowNumeric bool) string
Constants ¶
View Source
const ( // CharsLowerAlpha includes all lowercase alphabets. CharsLowerAlpha = "abcdefghijklmnopqrstuvwxyz" // CharsUpperAlpha includes all uppercase alphabets. CharsUpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" // CharsUpperAlpha includes all numeric characters. CharsNumeric = "0123456789" )
Variables ¶
This section is empty.
Functions ¶
func Int64 ¶
Int64 generates a random integer from the interval [0, max). This is not cryptographically secure.
func SecureInt64 ¶
SecureInt64 generates a cryptographically secure random integer from the interval [0, max).
func SecureString ¶
func SecureString( n int, allowLowerAlpha bool, allowUpperAlpha bool, allowNumeric bool, ) (string, error)
SecureString generates a cryptographically secure random string of given length. allowLowerAlpha, allowUpperAlpha, and allowNumeric can be used to include/exclude lowercase, uppercase, and numeric characters respectively.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.