Documentation ¶
Overview ¶
package unique 对象唯一ID
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenUniqueKey ¶
Types ¶
type MultiGenerator ¶ added in v0.18.0
type MultiGenerator struct {
// contains filtered or unexported fields
}
统一管理各个需要生成unique id的generator对象
func (*MultiGenerator) GenUniqueKey ¶ added in v0.18.0
func (mi *MultiGenerator) GenUniqueKey(prefix string) string
type SingleGenerator ¶ added in v0.18.0
type SingleGenerator struct {
// contains filtered or unexported fields
}
只管理一个需要生成unique id的generator对象
func NewSingleGenerator ¶ added in v0.18.0
func NewSingleGenerator(prefix string) *SingleGenerator
func (*SingleGenerator) GenUniqueKey ¶ added in v0.18.0
func (si *SingleGenerator) GenUniqueKey() string
Click to show internal directories.
Click to hide internal directories.