unique

package
v0.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 3 Imported by: 23

Documentation

Overview

package unique 对象唯一ID

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenUniqueKey

func GenUniqueKey(prefix string) string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL