Versions in this module Expand all Collapse all v1 v1.0.0 Aug 25, 2026 Changes in this version + var ErrClockRollback = errors.New("identifier clock rollback") + var ErrEntropy = errors.New("identifier entropy failure") + var ErrInvalid = errors.New("invalid identifier") + var ErrOverflow = errors.New("identifier sequence overflow") + var ErrUnsupported = errors.New("unsupported identifier") + type Clock interface + Now func() time.Time + type ClockFunc func() time.Time + func (clock ClockFunc) Now() time.Time + type Family string + const FamilyKSUID + const FamilyNanoID + const FamilyTypeID + const FamilyULID + const FamilyUUID + type Generator interface + New func() (T, error) + type ID struct + func Parse[Tag Validator](text string) (ID[Tag], error) + func (id *ID[Tag]) Scan(src any) error + func (id *ID[Tag]) UnmarshalBinary(data []byte) error + func (id *ID[Tag]) UnmarshalJSON(data []byte) error + func (id *ID[Tag]) UnmarshalText(text []byte) error + func (id ID[Tag]) Compare(other ID[Tag]) int + func (id ID[Tag]) IsZero() bool + func (id ID[Tag]) LogValue() slog.Value + func (id ID[Tag]) MarshalBinary() ([]byte, error) + func (id ID[Tag]) MarshalJSON() ([]byte, error) + func (id ID[Tag]) MarshalText() ([]byte, error) + func (id ID[Tag]) String() string + func (id ID[Tag]) Value() (driver.Value, error) + type Inspection struct + Family Family + HasTime bool + Sortable bool + Timestamp time.Time + Version int + type Validator interface + Validate func(string) error