Documentation
¶
Overview ¶
Package ids encapsulates common id generation uses in namespacelabs projects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBase32String ¶
func DecodeBase62String ¶
func EncodeToBase32String ¶
func EncodeToBase62String ¶
func NewRandomBase32ID ¶
NewID returns a random ID in base32, which is not as compact as say base62 but is usable in scenarios which are case agnostic, and only allow alphanumeric values, such as subdomain segments.
func NewRandomBase62ID ¶
Returns a base62-encoded ID from an alphanumeric dictionary, best suitable in scenarios which retain case. For IDs that need to managed manually by people, or need to be embedded into domain names or URLs, prefer `NewRandomBase32ID`.
func NewSortableID ¶
func NewSortableID() string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.