shortid

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Setting added in v0.0.15

type Setting = sonyflake.Settings

type Sonyflake

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

func New

func New(ss ...*Setting) *Sonyflake

New creates a new Sonyflake generator with a unique node.

func (Sonyflake) Name

func (s Sonyflake) Name() string

Name returns the name of the generator.

func (Sonyflake) Number added in v0.2.15

func (s Sonyflake) Number() int64

func (Sonyflake) Size

func (s Sonyflake) Size() int

Size returns the bit size of the generated Sonyflake ID.

func (Sonyflake) ValidateNumber added in v0.2.15

func (s Sonyflake) ValidateNumber(id int64) bool

Jump to

Keyboard shortcuts

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