Documentation ¶
Index ¶
- Constants
- Variables
- type Generator
- type ID
- func (value ID) IsZero() bool
- func (value ID) Lowerbound() ID
- func (value ID) MachineID() uint32
- func (value ID) MarshalJSON() ([]byte, error)
- func (value ID) MarshalText() (b []byte, e error)
- func (value ID) Sequence() uint32
- func (value ID) String() string
- func (value ID) Timestamp() time.Time
- func (value ID) ToSlice() []byte
- func (value *ID) UnmarshalJSON(data []byte) error
- func (value *ID) UnmarshalText(data []byte) error
- func (value ID) Upperbound() ID
- func (value ID) Valid() bool
Constants ¶
View Source
const ( EpochBegin = int64(1704067200000) // 2024-01-01T00:00:00Z SeqShift = 0 SeqMask = uint64(0xFFF) MachineIDShift = 12 MachineIDMask = uint64(0x3FF000) TimestampShift = 22 )
Variables ¶
View Source
var DefaultGenerator = &Generator{}
Functions ¶
This section is empty.
Types ¶
type Generator ¶
func (*Generator) NextAtUnixMilli ¶
type ID ¶
type ID uint64
func (ID) Lowerbound ¶
func (ID) MarshalJSON ¶
func (ID) MarshalText ¶
func (*ID) UnmarshalJSON ¶
func (*ID) UnmarshalText ¶
func (ID) Upperbound ¶
Click to show internal directories.
Click to hide internal directories.