sole

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() int64

Get 获取全局唯一标识符

func GetWith

func GetWith(name any) int64

GetWith 获取特定命名空间的唯一标识符

func RegNameSpace added in v0.0.20

func RegNameSpace(name any)

RegNameSpace 注册特定命名空间的唯一标识符

func Reset added in v0.0.20

func Reset()

Reset 重置全局唯一标识符

func ResetWith added in v0.0.20

func ResetWith(name any)

ResetWith 重置特定命名空间的唯一标识符

func SonyflakeID

func SonyflakeID() int64

SonyflakeID 获取一个雪花id

func SonyflakeIDE

func SonyflakeIDE() (int64, error)

SonyflakeIDE 获取一个雪花id

func SonyflakeSetting

func SonyflakeSetting(settings sonyflake.Settings)

SonyflakeSetting 配置雪花id生成策略

func UnRegNameSpace added in v0.0.20

func UnRegNameSpace(name any)

UnRegNameSpace 解除注销特定命名空间的唯一标识符

Types

This section is empty.

Jump to

Keyboard shortcuts

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