Documentation ¶
Overview ¶
Package idgen generates url safe lexically sorted universally unique ids with a prefix in go. Inspired from Stripe.
Index ¶
Constants ¶
View Source
const ( // SeparatorByte is the byte representation of the separator '_' character. SeparatorByte = byte('_') // SeparatorString is the string representation of the separator '_' character. SeparatorString = string(SeparatorByte) )
Variables ¶
View Source
var ( // ErrMalformed represents and error that is returned in case of malformed ulids ErrMalformed = errors.New("idgen: malformed ulid") )
Functions ¶
func New ¶
New generates a lexically sorted, url safe Id with a prefix. Eg: cus_JSfjkdjf333j46, i.e. {prefix}_{ulid}
Types ¶
Click to show internal directories.
Click to hide internal directories.