internal

package
v1.0.1-0...-abc8f6f Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2017 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLayout

func SetLayout(uuid []byte, layout Layout)

SetLayout sets the layout for uuid. This is intended to be called from the New function in packages that implement uuid generating functions.

func SetVersion

func SetVersion(uuid []byte, version Version)

SetVersion sets the version for uuid. This is intended to be called from the New function in packages that implement uuid generating functions.

Types

type Layout

type Layout byte

Layout represents the layout of UUID. See page 5 in RFC 4122.

const (
	// LayoutInvalid represents invalid layout.
	LayoutInvalid Layout = iota
	// LayoutNCS represents the NCS layout: Reserved, NCS backward compatibility (Values: 0x00-0x07).
	LayoutNCS
	// LayoutRFC4122 represents the RFC4122 layout: The variant specified in RFC 4122 (Values: 0x08-0x0b).
	LayoutRFC4122
	// LayoutMicrosoft represents the Microsoft layout: Reserved, Microsoft Corporation backward compatibility (Values: 0x0c-0x0d).
	LayoutMicrosoft
	// LayoutFuture represents the Future layout: Reserved for future definition. (Values: 0x0e-0x0f).
	LayoutFuture
)

func GetLayout

func GetLayout(uuid []byte) Layout

GetLayout returns layout of uuid.

type Version

type Version byte

Version represents the version of UUID. See page 7 in RFC 4122.

const (
	VersionUnknown       Version = iota // Unknwon
	VersionTimeBased                    // V1: The time-based version
	VersionDCESecurity                  // V2: The DCE security version, with embedded POSIX UIDs
	VersionNameBasedMD5                 // V3: The name-based version that uses MD5 hashing
	VersionRandom                       // V4: The randomly or pseudo-randomly generated version
	VersionNameBasedSHA1                // V5: The name-based version that uses SHA-1 hashing
)

Version List

func GetVersion

func GetVersion(uuid []byte) Version

GetVersion gets the version of uuid.

Directories

Path Synopsis
md5

Jump to

Keyboard shortcuts

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