Documentation ¶
Index ¶
- type FrozenTime
- func (f *FrozenTime) After(d time.Duration) time.Time
- func (f *FrozenTime) AfterFunc(d time.Duration) TimeFunc
- func (f *FrozenTime) AfterSec(s int64) time.Time
- func (f *FrozenTime) Before(d time.Duration) time.Time
- func (f *FrozenTime) BeforeFunc(d time.Duration) TimeFunc
- func (f *FrozenTime) BeforeSec(s int64) time.Time
- func (f *FrozenTime) MetaV1After(d time.Duration) *metav1.Time
- func (f *FrozenTime) MetaV1AfterFunc(d time.Duration) MetaV1TimeFunc
- func (f *FrozenTime) MetaV1AfterSec(s int64) *metav1.Time
- func (f *FrozenTime) MetaV1Before(d time.Duration) *metav1.Time
- func (f *FrozenTime) MetaV1BeforeFunc(d time.Duration) MetaV1TimeFunc
- func (f *FrozenTime) MetaV1BeforeSec(s int64) *metav1.Time
- func (f *FrozenTime) MetaV1Now() *metav1.Time
- func (f *FrozenTime) Now() time.Time
- func (f *FrozenTime) PbAfter(d time.Duration) *timestamppb.Timestamp
- func (f *FrozenTime) PbAfterFunc(d time.Duration) ProtobufTimeFunc
- func (f *FrozenTime) PbAfterSec(s int64) *timestamppb.Timestamp
- func (f *FrozenTime) PbBefore(d time.Duration) *timestamppb.Timestamp
- func (f *FrozenTime) PbBeforeFunc(d time.Duration) ProtobufTimeFunc
- func (f *FrozenTime) PbBeforeSec(s int64) *timestamppb.Timestamp
- func (f *FrozenTime) PbNow() *timestamppb.Timestamp
- type MetaV1TimeFunc
- type ProtobufTimeFunc
- type TimeFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FrozenTime ¶
type FrozenTime struct {
// contains filtered or unexported fields
}
FrozenTime is a type for testing out fake times.
func NewFrozenTime ¶
func NewFrozenTime(t time.Time) *FrozenTime
NewFrozenTime returns a FrozenTime for a given time.Time.
func NewFrozenTimeUnix ¶
func NewFrozenTimeUnix(unix int64) *FrozenTime
NewFrozenTime returns a FrozenTime for a given unix second.
func (*FrozenTime) After ¶
func (f *FrozenTime) After(d time.Duration) time.Time
After returns a time after FrozenTime.Now() by a given duration.
func (*FrozenTime) AfterFunc ¶
func (f *FrozenTime) AfterFunc(d time.Duration) TimeFunc
AfterFunc returns a TimeFunc where the return value is a time after FrozenTime.Now() by a given duration.
func (*FrozenTime) AfterSec ¶
func (f *FrozenTime) AfterSec(s int64) time.Time
After Now() by int64 seconds.
func (*FrozenTime) Before ¶
func (f *FrozenTime) Before(d time.Duration) time.Time
Before returns a time before FrozenTime.Now() by a given duration.
func (*FrozenTime) BeforeFunc ¶
func (f *FrozenTime) BeforeFunc(d time.Duration) TimeFunc
BeforeFunc returns a TimeFunc where the return value is a time before FrozenTime.Now() by a given duration.
func (*FrozenTime) BeforeSec ¶
func (f *FrozenTime) BeforeSec(s int64) time.Time
Before Now() by int64 seconds.
func (*FrozenTime) MetaV1After ¶
func (f *FrozenTime) MetaV1After(d time.Duration) *metav1.Time
func (*FrozenTime) MetaV1AfterFunc ¶
func (f *FrozenTime) MetaV1AfterFunc(d time.Duration) MetaV1TimeFunc
func (*FrozenTime) MetaV1AfterSec ¶
func (f *FrozenTime) MetaV1AfterSec(s int64) *metav1.Time
func (*FrozenTime) MetaV1Before ¶
func (f *FrozenTime) MetaV1Before(d time.Duration) *metav1.Time
func (*FrozenTime) MetaV1BeforeFunc ¶
func (f *FrozenTime) MetaV1BeforeFunc(d time.Duration) MetaV1TimeFunc
func (*FrozenTime) MetaV1BeforeSec ¶
func (f *FrozenTime) MetaV1BeforeSec(s int64) *metav1.Time
func (*FrozenTime) MetaV1Now ¶
func (f *FrozenTime) MetaV1Now() *metav1.Time
func (*FrozenTime) PbAfter ¶
func (f *FrozenTime) PbAfter(d time.Duration) *timestamppb.Timestamp
func (*FrozenTime) PbAfterFunc ¶
func (f *FrozenTime) PbAfterFunc(d time.Duration) ProtobufTimeFunc
func (*FrozenTime) PbAfterSec ¶
func (f *FrozenTime) PbAfterSec(s int64) *timestamppb.Timestamp
func (*FrozenTime) PbBefore ¶
func (f *FrozenTime) PbBefore(d time.Duration) *timestamppb.Timestamp
func (*FrozenTime) PbBeforeFunc ¶
func (f *FrozenTime) PbBeforeFunc(d time.Duration) ProtobufTimeFunc
func (*FrozenTime) PbBeforeSec ¶
func (f *FrozenTime) PbBeforeSec(s int64) *timestamppb.Timestamp
func (*FrozenTime) PbNow ¶
func (f *FrozenTime) PbNow() *timestamppb.Timestamp
type MetaV1TimeFunc ¶
type ProtobufTimeFunc ¶
type ProtobufTimeFunc func() *timestamppb.Timestamp
Click to show internal directories.
Click to hide internal directories.