This commit is contained in:
2022-06-16 22:19:06 +02:00
commit 085535931f
14 changed files with 812 additions and 0 deletions

17
id/id.go Normal file
View File

@@ -0,0 +1,17 @@
package id
import "github.com/nats-io/nuid"
var (
NUID ID = &nuidGen{}
)
type ID interface {
New() string
}
type nuidGen struct{}
func (i *nuidGen) New() string {
return nuid.Next()
}