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