Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UUIDv6 ¶
type UUIDv6 uuidBase
func UUIDv6FromBytes ¶
UUIDv6FromBytes creates a new UUIDv6 from a slice of bytes and returns an error, if an array length does not equal 16.
type UUIDv7 ¶
type UUIDv7 uuidBase
func UUIDv7FromBytes ¶
UUIDv7FromBytes creates a new UUIDv7 from a slice of bytes and returns an error, if an array length does not equal 16.
func (UUIDv7) Time ¶
Timestamp returns unix epoch stored in the struct without millisecond precision
func (UUIDv7) Timestamp ¶
Timestamp returns unix epoch stored in the struct without millisecond precision
func (UUIDv7) ToBinaryString ¶
func (UUIDv7) ToBitArray ¶
func (UUIDv7) ToMicrosoftString ¶
type UUIDv7Generator ¶
type UUIDv7Generator struct { SubsecondPrecisionLength int NodePrecisionLength int Node uint64 CounterPrecisionLength int // contains filtered or unexported fields }
Generator is a primary structure that allows you to create new UUIDv7 SubsecondPrecisionLength is a number of bits to carry sub-second information. On a systems with a high-resulution sub-second precision (like x64 Linux/Windows/MAC) it can go up to 48 bits NodePrecisionBits is a number of bits for node information. If this is not set to 0 [default], a Node variable must be set to a non-zero value Node information about the node generating UUIDs CounterPrecisionBits how many bits are dedicated to a counter. If two UUIDs were generated at the same time an internal counter would increase, distinguishing those UUIDs
func (*UUIDv7Generator) Next ¶
func (u *UUIDv7Generator) Next() (uuid UUIDv7)
UUIDv7FromBytes creates a new UUIDv7 from a slice of bytes and returns an error, if an array length does not equal 16.