id

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package id provides non-observability identifier helpers.

It generates UUID v4 idempotency keys and UUID v7 resource or entity IDs. Trace and span IDs remain observability data and are intentionally outside this package.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEntityID

func NewEntityID() (string, error)

NewEntityID returns a UUID v7 resource or entity identifier.

Example
package main

import (
	"fmt"

	"github.com/rshade/ax-go/id"
)

func main() {
	entityID, err := id.NewEntityID()
	if err != nil {
		fmt.Println("error:", err)
		return
	}
	fmt.Println(len(entityID))
}
Output:
36

func NewIdempotencyKey

func NewIdempotencyKey() string

NewIdempotencyKey returns a UUID v4 idempotency key.

Example
package main

import (
	"fmt"

	"github.com/rshade/ax-go/id"
)

func main() {
	key := id.NewIdempotencyKey()
	fmt.Println(len(key))
}
Output:
36

Types

This section is empty.

Jump to

Keyboard shortcuts

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