Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
func DefaultBaseConfig ¶
func DefaultBaseConfig() BaseConfig
type ConvConfig ¶
type ConvConfig struct { BaseConfig Len uint64 UseUpper bool UseLower bool UseNumber bool UseSymbol bool }
ConvConfig is configuration for generating random string with convinience.
type CustomConfig ¶
type CustomConfig struct { BaseConfig Len uint64 Chartset []byte }
Config is configuration for generating random string.
type Generator ¶
type Generator interface {
GenerateStream() (s <-chan []byte, cancel func())
}
Generate generates stream of random strings
func NewConvGenerator ¶
func NewConvGenerator(conf *ConvConfig) Generator
func NewCustomGenerator ¶
func NewCustomGenerator(conf *CustomConfig) Generator
func NewRegexGenerator ¶
func NewRegexGenerator(conf *RegexConfig) (Generator, error)
type RegexConfig ¶
type RegexConfig struct { BaseConfig Regex string MaxRepeat uint16 }
Config is configuration for regex matching random string.
Click to show internal directories.
Click to hide internal directories.