🎨 complete SMS login function

This commit is contained in:
landaiqing
2024-08-14 00:11:32 +08:00
parent 48c5aeb0f4
commit 368adadf52
38 changed files with 687 additions and 232 deletions

10
core/idgenerator.go Normal file
View File

@@ -0,0 +1,10 @@
package core
import "github.com/yitter/idgenerator-go/idgen"
func InitIDGenerator() {
var options = idgen.NewIdGeneratorOptions(1)
options.WorkerIdBitLength = 6 // 默认值6限定 WorkerId 最大值为2^6-1即默认最多支持64个节点。
options.SeqBitLength = 6 // 默认值6限制每毫秒生成的ID个数。若生成速度超过5万个/秒,建议加大 SeqBitLength 到 10。
idgen.SetIdGenerator(options)
}