Categorygithub.com/pborman/uuid
modulepackage
1.2.1
Repository: https://github.com/pborman/uuid.git
Documentation: pkg.go.dev

# README

This project was automatically exported from code.google.com/p/go-uuid

uuid build status

The uuid package generates and inspects UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.

This package now leverages the github.com/google/uuid package (which is based off an earlier version of this package).

Install

go get github.com/pborman/uuid

Documentation

GoDoc

Full go doc style documentation for the package can be viewed online without installing this package by using the GoDoc site here: http://godoc.org/github.com/pborman/uuid

# Functions

ClockSequence returns the current clock sequence, generating one if not already set.
Equal returns true if uuid1 and uuid2 are equal.
GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and clock sequence as well as adjusting the clock sequence as needed.
New returns a new random (version 4) UUID as a string.
NewDCEGroup returns a DCE Security (Version 2) UUID in the group domain with the id returned by os.Getgid.
NewDCEPerson returns a DCE Security (Version 2) UUID in the person domain with the id returned by os.Getuid.
NewDCESecurity returns a DCE Security (Version 2) UUID.
NewHash returns a new UUID derived from the hash of space concatenated with data generated by h.
NewMD5 returns a new MD5 (Version 3) UUID based on the supplied name space and data.
NewRandom returns a Random (Version 4) UUID or panics.
NewSHA1 returns a new SHA1 (Version 5) UUID based on the supplied name space and data.
NewUUID returns a Version 1 UUID based on the current NodeID and clock sequence, and the current time.
NodeID returns a slice of a copy of the current Node ID, setting the Node ID if not already set.
NodeInterface returns the name of the interface from which the NodeID was derived.
Parse decodes s into a UUID or returns nil.
ParseBytes is like Parse, except it parses a byte slice instead of a string.
SetClockSequence sets the clock sequence to the lower 14 bits of seq.
SetNodeID sets the Node ID to be used for Version 1 UUIDs.
SetNodeInterface selects the hardware address to be used for Version 1 UUIDs.
SetRand sets the random number generator to r, which implements io.Reader.

# Constants

Reserved for future definition.
Domain constants for DCE Security (Version 2) UUIDs.
Invalid UUID.
Reserved, Microsoft Corporation backward compatibility.
Domain constants for DCE Security (Version 2) UUIDs.
Domain constants for DCE Security (Version 2) UUIDs.
Reserved, NCS backward compatibility.
The variant specified in RFC4122.

# Variables

Well known Name Space IDs and UUIDs.
Well known Name Space IDs and UUIDs.
Well known Name Space IDs and UUIDs.
Well known Name Space IDs and UUIDs.
Well known Name Space IDs and UUIDs.

# Type aliases

Array is a pass-by-value UUID that can be used as an effecient key in a map.
A Domain represents a Version 2 domain.
A Time represents a time as the number of 100's of nanoseconds since 15 Oct 1582.
A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC 4122.
A Variant represents a UUIDs variant.
A Version represents a UUIDs version.