Documentation
¶
Overview ¶
Package uid provides functions to generate simple time-and-random-based unique identifiers.
Deprecated: Use github.com/Vonage/gosrvlib/pkg/uidc instead.
Index ¶
- func NewID64() stringdeprecated
- func NewID128() stringdeprecated
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewID64
deprecated
func NewID64() string
NewID64 generates and returns a new base-36-string-formatted 64 bit unique ID based on time (high 32 bit) and a random number (low 32 bit). NOTE: the zero time is set to the 1st of January of 10 years ago.
Deprecated: Use github.com/Vonage/gosrvlib/pkg/uidc NewID64() instead.
Example ¶
package main
import (
"fmt"
"github.com/Vonage/gosrvlib/pkg/uid"
)
func main() {
v := uid.NewID64()
fmt.Println(v)
}
Output:
func NewID128
deprecated
func NewID128() string
NewID128 generates and returns a new base-36-string-formatted 128 bit unique ID based on time (high 64 bit) and a random number (low 64 bit).
Deprecated: Use github.com/Vonage/gosrvlib/pkg/uidc NewID128() instead.
Example ¶
package main
import (
"fmt"
"github.com/Vonage/gosrvlib/pkg/uid"
)
func main() {
v := uid.NewID128()
fmt.Println(v)
}
Output:
Types ¶
This section is empty.