uniqueid

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenDefaultSnowID added in v0.0.2

func GenDefaultSnowID() (int64, error)

func GenId

func GenId() (int64, error)

GenId 生成一个唯一的雪花ID

func GenInviteCode

func GenInviteCode(userID uint64) (string, error)

GenInviteCode 根据用户ID生成邀请码

func GenSnowIDWithLength added in v0.0.2

func GenSnowIDWithLength(minDigits, maxDigits int) (id uint64, err error)

GenSnowIDWithLength 生成指定位数的ID minDigits: 最小位数(6-12) maxDigits: 最大位数(6-12)

func GenUserID

func GenUserID() (id uint64, err error)

func VerifyInviteCode

func VerifyInviteCode(code string) bool

VerifyInviteCode 验证邀请码格式

Types

This section is empty.

Jump to

Keyboard shortcuts

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