identifier

package module
v2.0.0-...-a923668 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 2 Imported by: 0

README

Go-Identifier

Go-Identifier is a simple package that generates NanoID and UUID v5 strings

Installation

go get github.com/allenakinkunle/go-identifier/v2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IIdentifier

type IIdentifier interface {
	NewNanoID() string
	NewUUIDv5(name string) string
}

type Identifier

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

func NewIdentifier

func NewIdentifier(characters string, namespace string) *Identifier

func (Identifier) NewNanoID

func (i Identifier) NewNanoID() string

func (Identifier) NewUUIDv5

func (i Identifier) NewUUIDv5(name string) string

type MockIdentifier

type MockIdentifier struct{}

MockIdentifier mockNanoGenerator Mock of IIdentifier

func NewMockIdentifier

func NewMockIdentifier() MockIdentifier

func (MockIdentifier) NewNanoID

func (m MockIdentifier) NewNanoID() string

func (MockIdentifier) NewUUIDv5

func (m MockIdentifier) NewUUIDv5(name string) string

Jump to

Keyboard shortcuts

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