ids

package
v0.4.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package ids validates and normalizes identifiers carried across module boundaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalModuleID

func CanonicalModuleID(value string) (string, bool)

CanonicalModuleID converts either a dashed UUID or the SDK's identifier-safe m<32hex> form to a lowercase dashed UUID. Invalid input returns ("", false). Whitespace is never trimmed: accepting it at an identity boundary would make the value used for comparison differ from the value received on the wire.

func ValidModuleSlug

func ValidModuleSlug(value string) bool

ValidModuleSlug reports whether value is a catalog module slug. Slugs use a lowercase ASCII letter followed by at most 15 lowercase ASCII letters, digits, or hyphens. The shared 16-byte limit keeps generated database identifiers below PostgreSQL's NAMEDATALEN boundary.

func ValidUIComponentName

func ValidUIComponentName(value string) bool

ValidUIComponentName reports whether value is a manifest UI component name. Names use an ASCII letter followed by at most 63 ASCII letters or digits. This is the stable name a mount request selects; the manifest separately maps it to a bundle export.

func ValidUUID

func ValidUUID(value string) bool

ValidUUID reports whether value has the dashed 8-4-4-4-12 UUID text shape.

This is deliberately a syntax validator rather than a UUID version policy: platform-owned identifiers may come from more than one UUID version, and a boundary that only needs a UUID-shaped join key must not reject one version while accepting another. Hex digits may use either case.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL