Documentation
¶
Overview ¶
Package ids validates the two identifier shapes the read-only resource groups accept on the command line: a UUIDv7 and a 64-hex-character hash. One home, so beacons, blocks and entropy refuse the same inputs with the same words, and one UUIDv7 rule, IsUUIDv7Text, which internal/proof's DetectIDType reads every other id by.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUUIDv7Text ¶ added in v0.17.0
IsUUIDv7Text reports whether s is the 36-character text of a UUIDv7 (RFC 9562 section 5.7), in either case: its version nibble is 7 and its variant is RFC 9562's. s is read exactly as given, so a value with a space or line feed around it, and a UUID's 32-hex, braced and urn: forms, are not.
func LooksLikeHash64 ¶
LooksLikeHash64 reports whether s has the SHAPE of a 64-hex hash rather than a UUID: no hyphens and 64 characters. It is a shape test on a value the user typed, used to pick a route, not validation; the filename- independence rule in CLAUDE.md is about a bundle's subject type and does not apply.
func ValidateHash64 ¶
ValidateHash64 returns nil iff s is exactly 64 lowercase hex characters. It is the client-side guard standing in for the server-side one a filter route does not have: an unguarded cast in a filter raises a 500.
func ValidateUUIDv7 ¶
ValidateUUIDv7 returns nil iff s is the text of a UUIDv7 by IsUUIDv7Text.
Types ¶
This section is empty.