Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFeasible = errors.New("Not feasible to generate requested number of codes") ErrPatternIsNotMatch = errors.New("Pattern is not match with the length value") )
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// Length of the code
Length uint16 `json:"length"`
// Count of the codes
Count uint16 `json:"count"`
// Charset to use
Charset string `json:"charset"`
// Prefix of the code
Prefix string `json:"prefix"`
// Suffix of the code
Suffix string `json:"suffix"`
// Pattern of the code
Pattern string `json:"pattern"`
// Suffix of the code
//
// Deprecated: use Suffix instead
Postfix string `json:"postfix"`
}
func NewWithOptions ¶
Creates a new generator with options
Click to show internal directories.
Click to hide internal directories.