package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

FromBytes returns a UUID generated from the raw byte slice input.
FromBytesOrNil returns a UUID generated from the raw byte slice input.
FromString returns a UUID parsed from the input string.
FromStringOrNil returns a UUID parsed from the input string.
FromUint128 delegates to FromBytes and wraps the result in a UUID.
MakeV4 calls NewV4.
Must is a helper that wraps a call to a function returning (UUID, error) and panics if the error is non-nil.
NewGen returns a new instance of Gen with some default values set.
NewGenWithHWAF builds a new UUID generator with the HWAddrFunc provided.
NewGenWithRand returns a new instance of gen which uses randUint64 as its source of randomness.
NewPopulatedUUID returns a populated UUID.
NewV1 returns a UUID based on the current timestamp and MAC address.
NewV3 returns a UUID based on the MD5 hash of the namespace UUID and name.
NewV4 returns a randomly generated UUID.
NewV5 returns a UUID based on SHA-1 hash of the namespace UUID and name.
RandomHardwareAddrFunc returns a random hardware address, with the multicast and local-admin bits set as per the IEEE802 spec.
TimestampFromV1 returns the Timestamp embedded within a V1 UUID.

# Constants

RFC4122StrSize of a size of the RFC-4122 string representation of UUID.
Size of a UUID in bytes.
Version 1 (date-time and MAC address).
Version 3 (namespace name-based).
Version 4 (random).
Version 5 (namespace name-based).
UUID layout variants.
UUID layout variants.
UUID layout variants.
UUID layout variants.

# Variables

DefaultGenerator is the default UUID Generator used by this package.
Max is the maximum possible UUID, which has all 128 bits set to 1.
Predefined namespace UUIDs.
Predefined namespace UUIDs.
Predefined namespace UUIDs.
Predefined namespace UUIDs.
Nil is the nil UUID, as specified in RFC-4122, which has all 128 bits set to zero.

# Structs

Gen is a reference UUID generator based on the specifications laid out in RFC-4122 and DCE 1.1: Authentication and Security Services.
NullUUID can be used with the standard sql package to represent a UUID value that can be NULL in the database.

# Interfaces

Generator provides an interface for generating UUIDs.

# Type aliases

Bytes represents a byte slice which is intended to be interpreted as a binary encoding of a UUID.
HWAddrFunc is the function type used to provide hardware (MAC) addresses.
ShortStringer implements fmt.Stringer to output Short() on String().
Timestamp is the count of 100-nanosecond intervals since 00:00:00.00, 15 October 1582 within a V1 UUID.
UUID is an array type to represent the value of a UUID, as defined in RFC-4122.