uuid

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package uuid generates Flow's durable identifiers and re-exports the identifier type so identifier-producing packages depend on one policy.

Index

Constants

This section is empty.

Variables

View Source
var Nil = guuid.Nil

Nil is the zero identifier.

Functions

This section is empty.

Types

type UUID

type UUID = guuid.UUID

UUID is Flow's durable identifier type. The alias keeps values fully interchangeable with the underlying library type used by pgx and tests.

func New

func New() UUID

New returns a UUIDv7 identifier. Time-ordered identifiers keep hot primary-key indexes append-mostly and make identifier byte order correlate with creation order; generation is strictly monotonic within one process. The tradeoff is deliberate: identifiers encode their creation time, so they are not secrets, matching Flow's existing guidance that keys and identifiers must not carry sensitive values.

func Parse

func Parse(value string) (UUID, error)

Parse decodes an identifier at a public or storage boundary.

Jump to

Keyboard shortcuts

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