Versions in this module Expand all Collapse all v0 v0.3.0 Jul 19, 2022 Changes in this version + const BitLenMachineId + const BitLenSequence + const BitLenTime + func Decompose(id uint64) map[string]uint64 + func ToHex(id uint64) string + func ToInt(id string) (uint64, error) + type Settings struct + CheckMachineId func(uint16) bool + MachineId func() (uint16, error) + StartTime time.Time + type Snowflake struct + func NewSnowflake(st Settings) *Snowflake + func (sf *Snowflake) Marshal() string + func (sf *Snowflake) NextID() (uint64, error)