Versions in this module Expand all Collapse all v1 v1.0.3 Apr 19, 2021 Changes in this version + const BitLenMachineID + const BitLenSequence + const BitLenTime + func Decompose(id uint64) map[string]uint64 + type ID uint64 + 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 uint64) ID + func ParseIntBytes(id [8]byte) ID + func ParseString(id string) (ID, 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() uint64 + func (f ID) IntBytes() [8]byte + func (f ID) String() string + type Settings struct + CheckMachineID func(uint16) bool + MachineID func() (uint16, error) + StartTime time.Time + type Sonyflake struct + func NewSonyflake(st Settings) *Sonyflake + func (sf *Sonyflake) NextID() (ID, error)