Documentation
¶
Overview ¶
Package snowflake providers a unique ID generator based on Twitter's Snowflake ID.
Index ¶
Constants ¶
View Source
const (
Epoch int64 = 1288834974657
)
Variables ¶
View Source
var ( // NodeBits is the number of bits to use for Node. NodeBits uint8 = 10 // StepBits is the number of bits to use for Step. StepBits uint8 = 12 )
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID int64
ID is a unique ID
func ParseBase64 ¶
Parsebase64 parses a base64 encoded string into an Snowflake ID.
func ParseBytes ¶
ParseString parses a string into an Snowflake ID.
func (ID) ProtoMessage ¶
ProtoMessage returns the ID as a protobuf Snowflake message.
Click to show internal directories.
Click to hide internal directories.