Versions in this module Expand all Collapse all v1 v1.0.0 May 13, 2023 Changes in this version + const SnowflakeEpoch + var ErrInvalidStringChar = errors.New("ErrInvalidStringChar") + var ErrInvalidStringLength = errors.New("ErrInvalidStringLength") + type Generator struct + func New(epoch int64, sequence uint32) Generator + func (gen *Generator) Extract(id ID) (time.Time, uint32, [2]byte) + func (gen *Generator) NewID() (id ID) + type ID [lenbyt]byte + var Empty ID + func Parse(str string) (id ID, err error) + func (id *ID) Scan(src any) error + func (id *ID) UnmarshalBinary(data []byte) error + func (id *ID) UnmarshalJSON(p []byte) error + func (id *ID) UnmarshalText(text []byte) error + func (id ID) MarshalBinary() (data []byte, err error) + func (id ID) MarshalJSON() ([]byte, error) + func (id ID) MarshalText() (text []byte, err error) + func (id ID) String() string + func (id ID) Value() (driver.Value, error)