Documentation ¶
Index ¶
Constants ¶
View Source
const UUIDSize = 16
UUIDSize is the size of the uuid
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UUID ¶
OrderedUUID is an UUIDv1 with some bit shifted for database index performance
func FromString ¶
FromString returns an OrderedUUID parsed from string input. Input is expected in a form accepted by UnmarshalText.
func FromUUIDv1 ¶
func FromUUIDv1(uuid uuid.UUID) UUID
FromUUIDv1 populates Byte from uuidV1 and converts it
func NewOrdered ¶
func NewOrdered() UUID
NewOrdered creates a new UUIDv1 and converts it to an OrderedUUID
v1 UUID: aaaabbbb-cccc-dddd-1234-567890123456 transposed: ddddcccc-aaaa-bbbb-1234-567890123456
func (UUID) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface. The encoding is the same as returned by String.
func (*UUID) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface. Following formats are supported:
"6ba7b810-9dad-11d1-80b4-00c04fd430c8", "6ba7b8109dad11d180b400c04fd430c8"
Supported UUID text representation follows:
uuid := canonical | hashlike plain := canonical | hashlike canonical := 4hexoct '-' 2hexoct '-' 2hexoct '-' 6hexoct hashlike := 12hexoct
Click to show internal directories.
Click to hide internal directories.