Versions in this module Expand all Collapse all v1 v1.0.1 Aug 16, 2022 Changes in this version + type GLflake struct + func (gf *GLflake) NextID() (ID, error) v1.0.0 Oct 14, 2021 Changes in this version + const BitLenMachineID + const BitLenSequence + const BitLenTime + var ErrInvalidBase32 = errors.New("invalid base32") + var ErrInvalidBase58 = errors.New("invalid base58") + func Decompose(id ID) map[string]int64 + func NewGlflake(st Settings) *glflake + type ID int64 + func ParseBase2(id string) (ID, error) + func ParseBase32(b []byte) (ID, error) + func ParseBase36(id string) (ID, error) + func ParseBase58(b []byte) (ID, error) + func ParseBase64(id string) (ID, error) + func ParseBytes(id []byte) (ID, error) + func ParseInt64(id int64) ID + func ParseIntBytes(id [8]byte) ID + func ParseString(id string) (ID, error) + func (f *ID) UnmarshalJSON(b []byte) error + func (f ID) Base2() string + func (f ID) Base32() string + func (f ID) Base36() string + func (f ID) Base58() string + func (f ID) Base64() string + func (f ID) Bytes() []byte + func (f ID) Int64() int64 + func (f ID) IntBytes() [8]byte + func (f ID) LeadingZerosString(zeroN uint8) string + func (f ID) MarshalJSON() ([]byte, error) + func (f ID) String() string + type JSONSyntaxError struct + func (j JSONSyntaxError) Error() string + type Settings struct + CheckMachineID func(uint16) bool + MachineID func() (uint16, error) + StartTime time.Time + func (s *Settings) Init(mID uint16) + func (s *Settings) StartTimeSet(t time.Time)