Documentation ¶
Overview ¶
Package uuid is a simple library for generating RFC4122 compliant universally unique identifiers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Version Version Interfaces []net.Interface RandomReader func([]byte) (int, error) }
A Configuration provides sources of things.
type Generator ¶
type Generator struct { Version Version // contains filtered or unexported fields }
A Generator is a factory for creating new UUIDs
func NewGenerator ¶
func NewGenerator(configuration Configuration) (g *Generator, err error)
NewGenerator creates a new UUID generator which operates with the given configuration.
type NamespaceGenerator ¶
type NamespaceGenerator struct { Namespace UUID Version Version // contains filtered or unexported fields }
A NamespaceGenerator allows consumers to generate UUIDs for a given namespace and name.
func NewNamespaceGenerator ¶
func NewNamespaceGenerator(namespace UUID, configuration Configuration) (g *NamespaceGenerator, err error)
NewNamespaceGenerator creates a new UUID generator for the given namespace and configuration.
func (*NamespaceGenerator) Generate ¶
func (g *NamespaceGenerator) Generate(name []byte) UUID
Generate procues a new UUID that refelcts the given
Click to show internal directories.
Click to hide internal directories.