uid

package
v0.2.81 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: LGPL-2.1 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Nil is a nil id.
	Nil Id = ""

	// New generates a new id.
	New = func() Id {
		return Id(ksuid.New().String())
	}

	// From generate id from string.
	From = func(str string) Id {
		return Id(str)
	}
)

Functions

This section is empty.

Types

type Id

type Id string

Id represents a global unique id.

func (Id) IsNil

func (id Id) IsNil() bool

IsNil checks if an Id is nil.

func (Id) String

func (id Id) String() string

String implements fmt.Stringer

Jump to

Keyboard shortcuts

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