Versions in this module Expand all Collapse all v1 v1.3.3 Mar 24, 2023 Changes in this version + const Default_nodeId + const Nodeid_key + func GetDefauleNodeId(pairs []types.Pair) int64 + func Regist(name string, IdGen IdGenerator) error + func Replace(name string, IdGen IdGenerator) error + func UnRegist(name string) error + func WithNodeID(v int64) (p types.Pair) + type IdGenerator interface + GenId func(pairs ...types.Pair) string + GetName func() string + func Get(name string) (IdGenerator, bool) + func Instance(name string) IdGenerator + type SnowflakeID struct + func CreateSnowflake(nodeid int64) SnowflakeID + func (self *SnowflakeID) GenId(pairs ...types.Pair) string + func (self *SnowflakeID) GetName() string + func (self *SnowflakeID) SnowflakeId(pairs ...types.Pair) int64 + type Uuid struct + func (self *Uuid) GenId(pairs ...types.Pair) string + func (self *Uuid) GetName() string