Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefEpoch int64 = 1504426600000 // 2017-09-03 16:16:40.000 DefTimeAccuracy int64 = 1000000 // Millisecond 1000000 DefMaxBits uint8 = 63 // the max length of number (math:pow(2, 63)). without check generated id. DefNodeBits uint8 = 10 // 1024 workers DefSequenceBits uint8 = 12 // 4096 numbers of per time accuracy )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID int64
func ParseBase2 ¶
ParseBase2 converts a Base2 string into a snowflake ID
func ParseBase64 ¶
ParseBase64 converts a base64 string into a snowflake ID
func ParseBytes ¶
ParseBytes converts a byte slice into a snowflake ID
func ParseString ¶
ParseString converts a string into a snowflake ID
Click to show internal directories.
Click to hide internal directories.