cuid2

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 9 Imported by: 0

README

Cuid2

A golang port of the js cuid2 library, the original version can be found here

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCuid

func IsCuid(id string, minLength, maxLength int) bool

Types

type Counter

type Counter = func() int

type Gen

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

func New

func New(opts GenOpts) Gen

func (Gen) Cuid2

func (gen Gen) Cuid2() string

type GenOpts

type GenOpts struct {
	Length      int
	Fingerprint string
	Counter     func() int
	// contains filtered or unexported fields
}

type Number

type Number interface {
	constraints.Integer | constraints.Float
}

Jump to

Keyboard shortcuts

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