ids

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func IsUUIDv7Text(s string) bool

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

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 is the text of a UUIDv7 by IsUUIDv7Text.

Types

This section is empty.

Jump to

Keyboard shortcuts

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