Versions in this module Expand all Collapse all v1 v1.0.0 Aug 5, 2026 Changes in this version + const EntropyLen + var ErrEntropyUnavailable = errors.New("nulid: secure entropy unavailable") + var ErrMonotonicOverflow = errors.New("nulid: monotonic entropy overflow") + var ErrScanValue = errors.New("nulid: unsupported value type for Scan") + type MonotonicEntropy struct + func Monotonic(entropy io.Reader, inc uint64) *MonotonicEntropy + func (m *MonotonicEntropy) MonotonicRead(timestampNanos uint64, p []byte) error + func (m *MonotonicEntropy) MonotonicReadBig(timestampNanos *big.Int, p []byte) error + type MonotonicReader interface + MonotonicRead func(timestampNanos uint64, p []byte) error + type MonotonicReaderBig interface + MonotonicReadBig func(timestampNanos *big.Int, p []byte) error + type NULID [16]byte + func FromNanos(timestampNanos uint64, random uint64) NULID + func FromNanosBig(timestampNanos *big.Int, random uint64) (NULID, error) + func FromTime(t time.Time, random uint64) (NULID, error) + func Make() (id NULID) + func MustParse(ulid string) NULID + func New() (NULID, error) + func NewWithEntropy(timestampNanos uint64, r io.Reader) (NULID, error) + func NewWithEntropyBig(timestampNanos *big.Int, r io.Reader) (NULID, error) + func NewWithTime(t time.Time, r io.Reader) (NULID, error) + func Parse(id string) (NULID, error) + func (id *NULID) Scan(src any) error + func (id *NULID) UnmarshalBinary(data []byte) error + func (id *NULID) UnmarshalText(text []byte) error + func (id NULID) Bytes() [16]byte + func (id NULID) Compare(other NULID) int + func (id NULID) IsNil() bool + func (id NULID) Less(other NULID) bool + func (id NULID) MarshalBinary() ([]byte, error) + func (id NULID) MarshalText() ([]byte, error) + func (id NULID) Random() uint64 + func (id NULID) String() string + func (id NULID) Time() time.Time + func (id NULID) Value() (driver.Value, error)