idkit

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 11 Imported by: 1

Documentation

Overview

Package idkit provides the set of functions to generate different kind of identifiers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigiCode

func DigiCode() string

DigiCode returns 6-digit code as a string.

func NewULID added in v0.2.46

func NewULID() (string, error)

NewULID returns ULID identifier as string.

func ParseXID added in v0.2.18

func ParseXID(id string) (xid.ID, error)

ParseXID returns XID identifier as object.

func ULID

func ULID() string

ULID returns ULID identifier as string. More about ULID: https://github.com/ulid/spec Panics if it fails to generate an ID.

func ValidateDigiCode

func ValidateDigiCode(code string) error

ValidateDigiCode validates code from DigiCode.

func ValidateULID

func ValidateULID(id string) error

ValidateULID validates string representation of ULID identifier.

func ValidateXID

func ValidateXID(id string) error

ValidateXID validates string representation of XID identifier.

func XID

func XID() string

XID returns short unique identifier as string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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