package uuid

import "github.com/influxdata/influxdb/uuid"

Package uuid provides functions to create time-based UUIDs.

Index

Types

type UUID

type UUID [16]byte

UUID - unique identifier type representing a 128 bit number

func FromTime

func FromTime(aTime time.Time) UUID

FromTime generates a new time based UUID (version 1) as described in RFC 4122. This UUID contains the MAC address of the node that generated the UUID, the given timestamp and a sequence number.

func TimeUUID

func TimeUUID() UUID

TimeUUID generates a new time based UUID (version 1) using the current time as the timestamp.

func (UUID) String

func (u UUID) String() string

String returns the UUID in it's canonical form, a 32 digit hexadecimal number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Source Files

uuid.go

Version
v1.12.0 (latest)
Published
Apr 8, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
2 days ago

Tools for package owners.