Documentation ¶
Overview ¶
Package ident provides the helpers functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StartNumber = int64(rand.Int32()) << 32
StartNumber is the start number of the ident.
Functions ¶
func GenID ¶
func GenID() string
GenID The function "GenID" generates a new unique identifier and returns it as a string.
func Register ¶ added in v0.0.2
func Register(identifier Identifier)
Register sets the defaultIdentifier ident.
Types ¶
type Identifier ¶ added in v0.0.2
Identifier is the interface of ident.
func NewNumber ¶ added in v0.0.2
func NewNumber(sta int64) Identifier
NewNumber method creates a new instance of the ident type.
Directories ¶
Path | Synopsis |
---|---|
Package snowflake provides a unique ID generation based on Twitter Snowflake algorithm.
|
Package snowflake provides a unique ID generation based on Twitter Snowflake algorithm. |
Package ulid provides a ULID (Universally Unique Lexicographically Sortable Identifier) implementation.
|
Package ulid provides a ULID (Universally Unique Lexicographically Sortable Identifier) implementation. |
Package uuid provides a UUID (Universally Unique Identifier) implementation.
|
Package uuid provides a UUID (Universally Unique Identifier) implementation. |
Package xid provides a unique identifier generator based on xid.
|
Package xid provides a unique identifier generator based on xid. |
Click to show internal directories.
Click to hide internal directories.