Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeBase58 ¶
EncodeBase58 encodes a unique ID using Base58 (shorter than Base64)
func EncodeBase64 ¶
EncodeBase64 encodes a unique ID using Base64 (for URL-safe versions)
Types ¶
type ShortIDGenerator ¶
type ShortIDGenerator struct {
// contains filtered or unexported fields
}
ShortIDGenerator struct for configuration
func New ¶
func New(length int, charset, timeFormat string) *ShortIDGenerator
New creates a new ShortIDGenerator with custom options
func (*ShortIDGenerator) Generate ¶
func (g *ShortIDGenerator) Generate() string
Generate creates a unique, human-readable, timestamped ID
Click to show internal directories.
Click to hide internal directories.