xid

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: 2 Imported by: 0

Documentation

Overview

Package xid provides a unique identifier generator based on xid.

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 struct {
}

type XID

type XID struct{}

XID represents a unique identifier generator.

func New

func New(_ ...Setting) *XID

New creates a new instance of the XID identifier.

func (XID) Name

func (x XID) Name() string

Name returns the name of the identifier.

func (XID) Size

func (x XID) Size() int

Size returns the size of the xid in bits.

func (XID) String added in v0.2.15

func (x XID) String() string

String generates a new unique identifier.

func (XID) ValidateString added in v0.2.15

func (x XID) ValidateString(id string) bool

ValidateString checks if the provided id is a valid xid.

Jump to

Keyboard shortcuts

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