README ¶ snowflake useage node,_ := NewNode(1) generateId := node.Generate().Int64() Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type ID func (f ID) Base2() string func (f ID) Base64() string func (f ID) Bytes() []byte func (f ID) Int64() int64 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 ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type ID ¶ type ID int64 func (ID) Base2 ¶ func (f ID) Base2() 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) 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 snowflake.go Click to show internal directories. Click to hide internal directories.