uuid

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KEYTable = makeTable(0x80e2)

Functions

func ChecksumKey

func ChecksumKey(data []byte) string

func GenUUID

func GenUUID() string

GenUUID 生成一个随机的唯一ID

func GenUUID16

func GenUUID16() string

GenUUID16 截取uuid前16位

func Update

func Update(crc uint16, tab *Table, p []byte) uint16

Types

type SnowNode

type SnowNode struct {
	Node *snowflake.Node
}

func NewNode

func NewNode(i int64) *SnowNode

func (*SnowNode) GenSnowID

func (sn *SnowNode) GenSnowID() int64

func (*SnowNode) GenSnowStr

func (sn *SnowNode) GenSnowStr() string

type Table

type Table struct {
	// contains filtered or unexported fields
}

Table is a 256-word table representing the polynomial for efficient processing.

func MakeBitsReversedTable

func MakeBitsReversedTable(poly uint16) *Table

MakeBitsReversedTable returns the Table constructed from the specified polynomial.

func MakeTable

func MakeTable(poly uint16) *Table

func MakeTableNoXOR

func MakeTableNoXOR(poly uint16) *Table

MakeTableNoXOR returns the Table constructed from the specified polynomial. Updates happen without XOR in and XOR out.

Jump to

Keyboard shortcuts

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