Documentation
¶
Overview ¶
Package ids provides identifier helpers shared across SDK packages. It is a leaf package with no internal imports so any SDK package can use it without creating a cycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalModuleID ¶
CanonicalModuleID converts an identifier-safe module ID back to the canonical UUID carried in broker claims. Canonical UUID input is returned unchanged so callers can compare identities without depending on transport representation.
func FormatUUID ¶
FormatUUID renders the 16-byte binary form Postgres returns for a `uuid` column as the canonical 8-4-4-4-12 hyphenated text form. pgx decodes an unregistered `uuid` into [16]byte, so a raw row map hands the consumer something whose fmt.Sprint is "[202 60 140 239 ...]" — a silently corrupted join key. Same %x idiom NewUUID already uses, so the two can never disagree on the text shape.
func NewUUID ¶
func NewUUID() string
NewUUID returns a random UUID v4 string (version 4, variant RFC 4122). Panics if crypto/rand.Read fails — callers cannot recover from entropy exhaustion on this path.
func NormalizeModuleID ¶
NormalizeModuleID converts the platform's canonical UUID identity to the identifier-safe m<32hex> form used by module schemas and manifests. It also accepts that compact form unchanged. Other legacy/dev IDs are deliberately outside this helper even though Config still accepts them for compatibility.
Types ¶
This section is empty.