Documentation
¶
Overview ¶
Package uid wraps ULID generation and validation for kata stable IDs.
Index ¶
Constants ¶
const EncodedLen = encodedLen
EncodedLen is the fixed character length of a Crockford base32-encoded ULID.
Variables ¶
This section is empty.
Functions ¶
func FromStableSeed ¶
FromStableSeed returns a deterministic ULID whose timestamp is t and whose 80-bit entropy is SHA-256(seed)[:10].
func FromTime ¶
FromTime returns a ULID whose timestamp is t and whose entropy is random. It is not deterministic and must not be used for JSONL v1->v2 fill rules.
func Length ¶
func Length() int
Length is the fixed character length of a kata ULID (Crockford base32).
func MustTime ¶
MustTime extracts the timestamp from a valid ULID and panics on invalid input. It is intended for tests and invariant-checked call sites.
func ValidPrefix ¶
ValidPrefix reports whether s is a valid leftmost ULID prefix.
Types ¶
This section is empty.