Documentation ¶
Overview ¶
Package uniqueid defines functions that are likely to generate globally unique identifiers. We want to be able to generate many Ids quickly, so we make a time/space tradeoff. We reuse the same random data many times with a counter appended. Note: these Ids are NOT useful as a security mechanism as they will be predictable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Id ¶
type Id [16]byte
An Id is a likely globally unique identifier.
func FromHexString ¶
func (Id) VDLReflect ¶
type RandomGenerator ¶
type RandomGenerator struct {
// contains filtered or unexported fields
}
A RandomGenerator can generate random Ids. The zero value of RandomGenerator is ready to use.
func (*RandomGenerator) NewID ¶
func (g *RandomGenerator) NewID() (Id, error)
NewId produces a new probably unique identifier.
Click to show internal directories.
Click to hide internal directories.