Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock interface {
Now() Timestamp
}
Clock is an interface for getting the current Timestamp.
type MockClock ¶
type MockClock struct {
// contains filtered or unexported fields
}
MockClock is a mock implementation of Clock.
func NewMockClock ¶
NewMockClock returns a new MockClock.
type Timestamp ¶
type Timestamp struct {
// contains filtered or unexported fields
}
Timestamp is a wrapper for time.Time.
func TimeToTimestamp ¶
TimeToTimestamp return the Timestamp that wraps the given time.Time.
func (Timestamp) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.