Versions in this module Expand all Collapse all v0 v0.0.2 Jul 23, 2023 v0.0.1 Apr 3, 2023 Changes in this version + const EncodedSize + const Encoding + var ErrBigTime = errors.New("ulid: time too big") + var ErrBufferSize = errors.New("ulid: bad buffer size when marshaling") + var ErrDataSize = errors.New("ulid: bad data size when unmarshaling") + var ErrInvalidCharacters = errors.New("ulid: bad data characters when unmarshaling") + var ErrMonotonicOverflow = errors.New("ulid: monotonic entropy overflow") + var ErrOverflow = errors.New("ulid: overflow when unmarshaling") + var ErrScanValue = errors.New("ulid: source value must be a string or byte slice") + func DefaultEntropy() io.Reader + func MaxTime() uint64 + func Now() uint64 + func Time(ms uint64) time.Time + func Timestamp(t time.Time) uint64 + type LockedMonotonicReader struct + func (r *LockedMonotonicReader) MonotonicRead(ms uint64, p []byte) error + type MonotonicEntropy struct + func Monotonic(entropy io.Reader, inc uint64) *MonotonicEntropy + func (m *MonotonicEntropy) MonotonicRead(ms uint64, entropy []byte) (err error) + type MonotonicReader interface + MonotonicRead func(ms uint64, p []byte) error + type ULID [16]byte + func Make() (id ULID) + func MustNew(ms uint64, entropy io.Reader) ULID + func MustNewDefault(t time.Time) ULID + func MustParse(ulid string) ULID + func MustParseStrict(ulid string) ULID + func New(ms uint64, entropy io.Reader) (id ULID, err error) + func Parse(ulid string) (id ULID, err error) + func ParseStrict(ulid string) (id ULID, err error) + func (id *ULID) Scan(src any) error + func (id *ULID) SetEntropy(e []byte) error + func (id *ULID) SetTime(ms uint64) error + func (id *ULID) UnmarshalBinary(data []byte) error + func (id *ULID) UnmarshalText(v []byte) error + func (id ULID) Bytes() []byte + func (id ULID) Compare(other ULID) int + func (id ULID) Entropy() []byte + func (id ULID) MarshalBinary() ([]byte, error) + func (id ULID) MarshalBinaryTo(dst []byte) error + func (id ULID) MarshalText() ([]byte, error) + func (id ULID) MarshalTextTo(dst []byte) error + func (id ULID) String() string + func (id ULID) Time() uint64 + func (id ULID) Value() (driver.Value, error)