ids

package
v0.16.1 Latest Latest
Warning

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

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

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LooksLikeHash64

func LooksLikeHash64(s string) bool

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

func ValidateHash64(s string) error

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

func ValidateUUIDv7(s string) error

ValidateUUIDv7 returns nil iff s parses as a UUID whose version is 7.

Types

This section is empty.

Jump to

Keyboard shortcuts

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