Versions in this module Expand all Collapse all v0 v0.60.0 Nov 12, 2026 Changes in this version + const GoodBits + const MaxCustomSymbols + const MaxLength + const MinAliasLength + const MinBits + const MinCustomSymbols + const MissesPerDay + const ModelAttackerAddresses + const ModelLiveLinks + const PresetAlnum + const PresetCustom + const PresetDigits + const PresetEmoji + const PresetURLSafe + var ErrCode = errors.New("short_link_code_invalid") + var ErrCollision = errors.New("short_link_alphabet_collision") + var ErrCustomSymbols = errors.New("short_link_alphabet_symbols") + var ErrLength = errors.New("short_link_length") + var ErrPreset = errors.New("short_link_alphabet_unknown") + var ErrSymbol = errors.New("short_link_alphabet_symbol") + var ErrTooWeak = errors.New("short_link_too_weak") + func Bits(size, n int) float64 + func Canonical(code string, caseSensitive bool) (string, bool) + func CheckAlias(alias string, caseSensitive bool) (string, error) + func DecodeSegment(escaped string) (string, bool) + func EscapePath(code string) string + func FoldRune(r rune) rune + func GuessDays(bits float64, links, addresses int) float64 + func Key(canonical string) string + func ReservedCode(canonical string) bool + func SymbolAllowed(r rune) bool + func Symbols(code string) int + type Alphabet struct + func NewAlphabet(preset, custom string, caseSensitive bool) (Alphabet, error) + func (a Alphabet) Bits(n int) float64 + func (a Alphabet) CaseSensitive() bool + func (a Alphabet) CheckRule(n int) error + func (a Alphabet) Generate(n int) (string, error) + func (a Alphabet) MinLengthFor(bits float64) int + func (a Alphabet) Preset() string + func (a Alphabet) Size() int + func (a Alphabet) Symbols() string