Versions in this module Expand all Collapse all v0 v0.1.0 Jun 1, 2021 Changes in this version + const BinarySize + const HexEncodedSize + const MaxTimestamp + var ErrBigTime = errors.New("uulid: time greater than supported by the ulid spec") + var ErrBufferSize = errors.New("uulid: bad buffer size when marshaling") + var ErrDataSize = errors.New("uulid: bad data size when parsing") + var ErrInvalidType = errors.New("uulid: invalid type to unmarshal") + var ErrMonotonicOverflow = errors.New("uulid: monotonic overflow") + var ErrSmallTime = errors.New("uulid: time is lower than current generator") + func MaxTime() (t time.Time) + func Time(ms uint64) (t time.Time) + func Timestamp(t time.Time) (ms uint64) + type Generator struct + func NewGenerator() (r *Generator, err error) + func NewGeneratorWithSeed(seed uint64) (r *Generator) + func (r *Generator) New() (id UULID, err error) + type UULID [BinarySize]byte + func New() (id UULID, err error) + func Parse(data []byte) (id UULID, err error) + func (id *UULID) Scan(src interface{}) (err error) + func (id *UULID) SetEntropy(e []byte) (err error) + func (id *UULID) SetTime(t time.Time) (err error) + func (id *UULID) SetTimestamp(ms uint64) (err error) + func (id *UULID) String() (s string) + func (id *UULID) UnmarshalBinary(data []byte) (err error) + func (id *UULID) UnmarshalText(data []byte) (err error) + func (id UULID) Compare(other UULID) (i int) + func (id UULID) Entropy() (data []byte) + func (id UULID) MarshalBinary() (data []byte, err error) + func (id UULID) MarshalBinaryTo(dst []byte) (err error) + func (id UULID) MarshalText() (data []byte, err error) + func (id UULID) MarshalTextTo(dst []byte) (err error) + func (id UULID) Time() time.Time + func (id UULID) Timestamp() uint64 + func (id UULID) Value() (v driver.Value, err error)