uuids

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package uuids implements RFC 4122 version 4 UUIDs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UUID

type UUID [16]byte

Cf. RFC 4122 4.1.2. Bits stored in big-endian format. UUID[ 0] = (TimeLow >> 24) & 0xff UUID[ 1] = (TimeLow >> 16) & 0xff UUID[ 2] = (TimeLow >> 8) & 0xff UUID[ 3] = (TimeLow >> 8) & 0xff UUID[ 4] = (TimeMid >> 8) & 0xff UUID[ 5] = (TimeMid >> 0) & 0xff UUID[ 6] = (TimeHiAndVersion >> 8) & 0xff UUID[ 7] = (TimeHiAndVersion >> 0) & 0xff UUID[ 8] = (ClkSeqHiRes >> 0) & 0xff UUID[ 9] = (ClkSeqLow >> 0) & 0xff UUID[10] = (Node0 >> 0) & 0xff UUID[11] = (Node1 >> 0) & 0xff UUID[12] = (Node2 >> 0) & 0xff UUID[13] = (Node3 >> 0) & 0xff UUID[14] = (Node4 >> 0) & 0xff UUID[15] = (Node5 >> 0) & 0xff

func MakeV4 deprecated

func MakeV4(src []byte) UUID

Deprecated: TODO better naming

func V4

func V4() UUID

func (UUID) String

func (uuid UUID) String() string

Cf. RFC 4122 4.1.2. XXX The strings.Builder could be replaced by a static implementation.

Jump to

Keyboard shortcuts

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