Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultNanoidAlphabet = "6789BCDFGHJKLMNPQRTWbcdfghjkmnpqrtwz"
DefaultNanoidAlphabet is the alphabet used for ID characters by default
View Source
var DefaultNanoidSize = 16
DefaultNanoidSize is the size used for ID by default To get uuid like collision specify 21
Functions ¶
Types ¶
type Generator ¶ added in v3.11.23
type Generator struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(*Options)
Option func signature
func WithNanoidAlphabet ¶ added in v3.11.23
WithNanoidAlphabet specifies alphabet to use
func WithNanoidSize ¶ added in v3.11.23
WithNanoidSize specifies generated id size
func WithUUIDNode ¶ added in v3.11.23
WithUUIDNode specifies node component for UUIDv8
type Options ¶
Options contains id deneration options
func NewOptions ¶
NewOptions returns new Options struct filled by opts
Click to show internal directories.
Click to hide internal directories.