uniqid

package
v0.0.0-...-7426b64 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedOS = errors.New("unsupported uniqid os")

ErrUnsupportedOS indicates that an unsupported OS tried to store a uniqid as a file.

Functions

This section is empty.

Types

type BaseDirLocation

type BaseDirLocation int

BaseDirLocation facilitates base directory location option enums.

const (
	InHome BaseDirLocation = iota
	InTmp
)

BaseDirLocation enums define the base directory location options.

type UniqID

type UniqID struct {
	ID uuid.UUID
}

UniqID manages the storage and retrieval of a unique id.

func New

func New(base BaseDirLocation) (*UniqID, error)

New retrieves or creates a new unique id.

func (*UniqID) String

func (u *UniqID) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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