Documentation
¶
Index ¶
Constants ¶
const MaxValidTimeNanoseconds = (2 ^ (64 - 1)) - 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Timestamp ¶
type Timestamp struct {
// contains filtered or unexported fields
}
Timestamp provides easy conversions and utility comparison functions making go to proto time comparison straightforward
func TimestampEpoch ¶
func TimestampEpoch() *Timestamp
TimestampEpoch returns the unix epoch - TimestampFromTime(time.Unix(0, 0)) noinspection GoNameStartsWithPackageName
func TimestampFromProto ¶
TimestampFromProto returns a Timestamp from proto time noinspection GoNameStartsWithPackageName
func TimestampFromTime ¶
TimestampFromTime returns a Timestamp from a time.time noinspection GoNameStartsWithPackageName
func TimestampNow ¶
func TimestampNow() *Timestamp
TimestampNow returns a timestamp that represents Now() noinspection GoNameStartsWithPackageName
func TimestampNowAddSeconds ¶
TimestampNowAddSeconds returns a timestamp that represents Now() + some number of seconds noinspection GoNameStartsWithPackageName
func (*Timestamp) After ¶
Before returns true when t1 is after t2, false otherwise noinspection GoReceiverNames
func (*Timestamp) Before ¶
Before returns true when t1 is before t2, false otherwise noinspection GoReceiverNames
func (*Timestamp) SameAs ¶
SamesAs returns true when t1 is the same time as t2, false otherwise noinspection GoReceiverNames