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 ¶
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.
Click to show internal directories.
Click to hide internal directories.