Documentation ¶
Index ¶
- type Second
- type Timestamp
- func (t Timestamp) AddDuration(d time.Duration) Timestamp
- func (t Timestamp) AddSecond(second Second) Timestamp
- func (t Timestamp) After(s Timestamp) bool
- func (t Timestamp) Before(s Timestamp) bool
- func (t Timestamp) Equals(s Timestamp) bool
- func (t Timestamp) Int64() int64
- func (t *Timestamp) IsZero() bool
- func (t Timestamp) Ref() *Timestamp
- func (t *Timestamp) Scan(src interface{}) error
- func (t Timestamp) Time() time.Time
- func (t Timestamp) UInt64() uint64
- func (t *Timestamp) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Second ¶
type Second uint64
Second represent a clock second
type Timestamp ¶
type Timestamp uint64
Timestamp is the number of seconds since unix epoch.
func (Timestamp) AddDuration ¶
AddDuration adds the given time.Duration to this Timestamp and returns a new Timestamp.
func (Timestamp) AddSecond ¶
AddSecond adds the given Second to this Timestamp and returns a new Timestamp.
func (Timestamp) After ¶
After returns true if this Timestamp happened after the given Timestamp. The method always returns false if at least one Timestamp is zero.
func (Timestamp) Before ¶
Before returns true if this Timestamp happened before the given Timestamp. The method always returns false if at least one Timestamp is zero.
func (Timestamp) Equals ¶
Equals returns true if this Timestamp happened at the same time as the given Timestamp. The method always returns false if at least one Timestamp is zero.