package
0.0.0-20200310085232-3db7acb8db78
Repository: https://github.com/freshcyber/contrib.git
Documentation: pkg.go.dev
# Functions
Decode returns a token from a 1-12 character base62 encoded string.
New returns a `Base62` encoded `Token` of *up to* `DefaultTokenLength` if you pass in a `tokenLength` between `MinTokenLength` and `MaxTokenLength` this will return a `Token` of *up to* that length instead if you pass in a `tokenLength` that is out of range it will panic.
# Constants
Base62 is a string respresentation of every possible base62 character.
DefaultTokenLength is the default size of a token.
ErrInvalidCharacter is the error returned or panic'd when a non `Base62` string is being parsed.
ErrTokenTooBig is the error returned or panic'd when a base62 token is larger than `MaxTokenLength`.
ErrTokenTooSmall is the error returned or panic'd when a base62 token is smaller than `MinTokenLength`.
MaxTokenLength is the largest possible character length of a token.
MinTokenLength is the smallest possible character length of a token.