Versions in this module Expand all Collapse all v1 v1.1.1 Oct 19, 2021 Changes in this version + var ErrInvalidID = errors.New("xxid: invalid ID") + func Sort(ids []ID) + func SortByMachine(ids []ID) + type Generator struct + func NewGenerator() *Generator + func (g *Generator) FromShort(short int64) (ID, error) + func (g *Generator) New() ID + func (g *Generator) NewWithTime(t time.Time) ID + func (g *Generator) UseFlag(flag uint8) *Generator + func (g *Generator) UseIP(ip net.IP) *Generator + func (g *Generator) UsePort(port uint16) *Generator + type ID [rawLen]byte + func FromBytes(b []byte) (ID, error) + func FromShort(short int64) (ID, error) + func FromString(id string) (ID, error) + func FromUUID(uuid string) (ID, error) + func New() ID + func NewWithTime(t time.Time) ID + func NilID() ID + func (id *ID) Scan(value interface{}) (err error) + func (id *ID) UnmarshalJSON(b []byte) error + func (id *ID) UnmarshalText(text []byte) error + func (id ID) Addr() string + func (id ID) Bytes() []byte + func (id ID) Compare(other ID) int + func (id ID) Counter() int32 + func (id ID) Flag() uint8 + func (id ID) IsNil() bool + func (id ID) Machine() []byte + func (id ID) MachineID() uint32 + func (id ID) MachineIP() net.IP + func (id ID) MarshalJSON() ([]byte, error) + func (id ID) MarshalText() ([]byte, error) + func (id ID) Pid() uint16 + func (id ID) Port() uint16 + func (id ID) Short() int64 + func (id ID) String() string + func (id ID) Time() time.Time + func (id ID) UUID() string + func (id ID) Value() (driver.Value, error)