Documentation
¶
Overview ¶
Package ids provides random identifier generation for stored records. All callers share the same entropy-minting logic; encoding and length are parameterised so each domain keeps its existing format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns a random identifier. byteLen controls entropy (output length is ceil(byteLen*8/5) characters). Panics if crypto/rand fails.
func NewE ¶
NewE is like New but returns an error instead of panicking when crypto/rand fails. Prefer this in library code where the caller can handle the failure gracefully.
func NewMessageID ¶
func NewMessageID() string
NewMessageID returns a UUIDv7 (RFC 9562): time-ordered, globally unique, standard format.
func NewMessageIDE ¶
NewMessageIDE is like NewMessageID but returns an error instead of panicking when crypto/rand fails.