Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidFormat = "Invalid uuid format"
Functions ¶
Types ¶
type UUID ¶
type UUID [16]byte
func UUIDV7FromObjectID ¶
UUIDV7FromObjectID returns a UUIDv7 from mongodb objectId string
func V7 ¶
NewV7 returns a UUID Version 7 生成一个uuidv7
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | unix_ts_ms | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | unix_ts_ms | ver | rand_a | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |var| rand_b | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | rand_b | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
func (UUID) ObjectIDHex ¶
ObjectIDHex returns a mongodb objectId string
func (UUID) ShortString ¶
ShortString returns a no dash hexadecimal string of a UUIDv7.
func (UUID) TimeFromV7 ¶
TimeFromV7 returns a time using time.Now hight bytes (now is 0 0).
Click to show internal directories.
Click to hide internal directories.