README

uuid

Go Report Card Codecov Build Status Go docs

go get 4d63.com/uuid
import 4d63.com/uuid

Package uuid exports typing for UUIDs. Sub-packages export functions for generating UUIDs of different types.

Documentation

See the godoc.

Documentation

Overview

    Package uuid exports typing for UUIDs. Sub-packages export functions for generating UUIDs of different types.

    Example
    Output:
    
    String: 08827178-0ad4-11e7-b5df-b3f54921aa61
    Timestamp: 1290011724057047416
    

    Index

    Examples

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type UUID

    type UUID [16]byte

      UUID is an implementation of the UUID RFC4122 standard. Ref: https://www.ietf.org/rfc/rfc4122.txt

      func New

      func New(b [16]byte) UUID

        New creates a UUID from a [16]byte.

        func Parse

        func Parse(s string) (UUID, error)

          Parse parses the hyphenated UUID string for a UUID.

          func (UUID) String

          func (id UUID) String() string

            String returns a text hyphenated hexadecimal representation of the UUID.

            func (UUID) Timestamp

            func (id UUID) Timestamp() int64

              Timestamp returns the integer value of the time portion of the UUID in 100ns intervals since Oct 15, 1582.

              Note: All UUIDs have a time bits, but only TimeUUIDs (UUID v1) contain the time in these bits, making the return value of this function relatively useless for other UUIDs.

              Source Files

              Directories

              Path Synopsis
              Package uuidv1 exports functions for creating version 1 UUIDs, based on the current or a fixed time.
              Package uuidv1 exports functions for creating version 1 UUIDs, based on the current or a fixed time.