id

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package id generates time-ordered entity identifiers: a UUIDv7 (RFC 9562) rendered as 26-character Crockford base32. The leading 48 bits are a big-endian Unix-millisecond timestamp, so the encoded string sorts lexicographically by creation time (millisecond granularity), keeping storage index inserts local and giving rows a rough creation order.

The TypeScript client (`client/src/id.ts`) emits the identical format, so identifiers are uniform whether minted by a client, a trusted server-side write, or a connector.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() string

New returns a new entity id: a UUIDv7 encoded as 26-character Crockford base32, lexicographically sortable by creation time. It panics only if the system random source fails, which Go treats as fatal everywhere else too.

Types

This section is empty.

Jump to

Keyboard shortcuts

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