# Functions
Digest a namespace UUID and a UniqueName, which then marshals to a new UUID.
Equal compares whether each UUID is the same.
Formatter formats a UUID into a human readable string which matches the given Format Use this for one time formatting when setting the default using SwitchFormat is overkill.
GetFormat returns the current default format pattern.
New creates a UUID from a slice of bytes.
NewHex creates a UUID from a hex string Will panic if hex string is invalid - will panic even with hyphens and brackets Expects a clean string use Parse otherwise.
NewName will create a unique name from several sources.
NewUUID creates a hex encoded uuid from a newly created random byte array.
NewV1 will generate a new RFC4122 version 1 UUID.
NewV3 will generate a new RFC4122 version 3 UUID V3 is based on the MD5 hash of a namespace identifier UUID and any type which implements the UniqueName interface for the name.
NewV4 will generate a new RFC4122 version 4 UUID A cryptographically secure random UUID.
NewV5 will generate a new RFC4122 version 5 UUID Generate a UUID based on the SHA-1 hash of a namespace identifier and a name.
Now returns current timestamp.
Parse creates a UUID from a valid string representation.
SetupCustomStateSaver sets the the UUID state saver to the given argument.
SetupFileSystemStateSaver creates a new save state server.
SwitchFormat switches the default printing format for ALL UUID strings A valid format will have 6 groups if the supplied Format does not.
SwitchFormatUpperCase is same as SwitchFormat but will make it uppercase.
UnmarshalBinary provides a safe way to unmarshal bytes into an existing UUID.
# Constants
Bracket prints lower case byte by byte UUID enclosed in brackets.
BracketHyphen prints lower case hyphened UUID enclosed in brackets.
Clean prints lower case byte by byte UUID.
CleanHyphen is the default UUID format.
Curly prints lower case byte by byte UUID enclosed in curly brackets.
CurlyHyphen prints lower case hyphened UUID enclosed in curly brackets.
DunnoYetv2 ...
GoIDFormat prints lower case hyphened UUID enclosed in square brackets.
NONE ...
RFC4122v1 ...
RFC4122v3 ...
RFC4122v4 ...
RFC4122v5 ...
# Variables
NamespaceDNS ...
NamespaceOID ...
NamespaceURL ...
NamespaceX500 ...
# Structs
FileSystemSaver implements the StateSaver interface for UUIDs.
State holds package information about the current state of the UUID generator.
StateSaverConfig is a wrapper for default setup of the FileSystemStateSaver.
Struct is used for RFC4122 Version 1 UUIDs.
# Interfaces
StateSaver is the interface required to setup a custom state saver if you wish to have v1 UUIDs based on your node id and constant time.
UniqueName is a Stinger interface Made for easy passing of IPs, URLs, the several Address types, Buffers and any other type which implements Stringer string, []byte types and Hash sums will need to be cast to the Name type or some other type which implements Stringer or UniqueName.
UUID main interface Each implementation must also implement the UniqueName interface.
# Type aliases
Array is a clean UUID type for simpler UUID versions.
A Format is a pattern used by the stringer interface with which to pr the UUID.
Name is a simple string which implements UniqueName which satisfies the Stringer interface.
Timestamp represents unix timestamp.
Version represents the type of UUID format.