Documentation ¶ Index ¶ Variables type ID func Generate() ID func (f ID) Base2() string func (f ID) Base36() string func (f ID) Base64() string func (f ID) Bytes() []byte func (f ID) Int64() int64 func (f ID) MD5() string func (f ID) Node() int64 func (f ID) Step() int64 func (f ID) String() string func (f ID) Time() int64 type Node func NewNode(node int64) (*Node, error) func (n *Node) Generate() ID Constants ¶ This section is empty. Variables ¶ View Source var ( Epoch int64 = 1288834974657 NodeBits uint8 = 10 StepBits uint8 = 12 ) Functions ¶ This section is empty. Types ¶ type ID ¶ type ID int64 func Generate ¶ func Generate() ID func (ID) Base2 ¶ func (f ID) Base2() string func (ID) Base36 ¶ func (f ID) Base36() string func (ID) Base64 ¶ func (f ID) Base64() string func (ID) Bytes ¶ func (f ID) Bytes() []byte func (ID) Int64 ¶ func (f ID) Int64() int64 func (ID) MD5 ¶ func (f ID) MD5() string func (ID) Node ¶ func (f ID) Node() int64 func (ID) Step ¶ func (f ID) Step() int64 func (ID) String ¶ func (f ID) String() string func (ID) Time ¶ func (f ID) Time() int64 type Node ¶ type Node struct { // contains filtered or unexported fields } func NewNode ¶ func NewNode(node int64) (*Node, error) func (*Node) Generate ¶ func (n *Node) Generate() ID Source Files ¶ View all Source files default.go snowflake.go Click to show internal directories. Click to hide internal directories.