Documentation
¶
Index ¶
- type EventID
- func (e EventID) Compare(other EventID) int
- func (e EventID) IsZero() bool
- func (e EventID) MarshalJSON() ([]byte, error)
- func (e EventID) OffsetTime(offset time.Duration) EventID
- func (e *EventID) Scan(value interface{}) error
- func (e EventID) String() string
- func (e EventID) Time() time.Time
- func (e *EventID) UnmarshalJSON(data []byte) error
- func (e EventID) Value() (driver.Value, error)
- type Generator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventID ¶
type EventID struct {
// contains filtered or unexported fields
}
func NewAfterTime ¶ added in v0.34.0
func NewWithTime ¶ added in v0.34.0
func (EventID) Compare ¶
Compare returns an integer comparing id and other lexicographically. The result will be 0 if e==other, -1 if e < other, and +1 if e > other.
func (EventID) MarshalJSON ¶ added in v0.16.0
func (EventID) OffsetTime ¶ added in v0.16.0
func (*EventID) UnmarshalJSON ¶ added in v0.16.0
type Generator ¶ added in v0.34.0
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶ added in v0.34.0
NewGenerator generates EventIDs with time.Now(). If due to clock skews, time.Now() <= t + 1ms, then the time used will be t + 1ms.
func NewGeneratorNow ¶ added in v0.35.0
func NewGeneratorNow() *Generator
Click to show internal directories.
Click to hide internal directories.