Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromUnixtimestamp ¶
func Unixtimestamp ¶
Types ¶
type ConcreteTimeProvider ¶
type ConcreteTimeProvider struct{}
func (ConcreteTimeProvider) Now ¶
func (c ConcreteTimeProvider) Now() time.Time
type FrozenTimeProvider ¶
This time provider is useful for unit tests, where you can "freeze" time to have concrete values you can test in the database
func (FrozenTimeProvider) Now ¶
func (p FrozenTimeProvider) Now() time.Time
type TimeMachine ¶
This time provider is useful if you need to hop through time in your tests; for example, to test cache expiration or such
func (*TimeMachine) Now ¶
func (p *TimeMachine) Now() time.Time
func (*TimeMachine) Travel ¶
func (p *TimeMachine) Travel(newTime time.Time)
type TimeProvider ¶
Click to show internal directories.
Click to hide internal directories.