Documentation ¶
Index ¶
Constants ¶
const DefaultCharset = DigitsCharset + LatinLowerCaseCharset + LatinUpperCaseCharset
DefaultCharset is string constant which contains default characters set for random string generator
const DigitsCharset = "0123456789"
DigitsCharset is string constant which contains digits characters set for random string generator
const LatinLowerCaseCharset = "abcdefghijklmnopqrstuvwxyz"
LatinLowerCaseCharset is string constant which contains lowercase latin characters set for random string generator
const LatinUpperCaseCharset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LatinUpperCaseCharset is string constant which contains uppercase latin characters set for random string generator
Variables ¶
This section is empty.
Functions ¶
func GenerateDigits ¶
GenerateDigits generates a string of random digits
func GenerateLowerCase ¶
GenerateLowerCase generates a string of random lowercase latin characters
func GenerateUpperCase ¶
GenerateUpperCase generates a string of random uppercase latin characters
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator is common object which provides generation of random string
func NewGenerator ¶
NewGenerator creates Generator instance with received length and characters set runes slice
func NewGeneratorFromString ¶
NewGeneratorFromString creates Generator instance with received length and characters set string