Documentation ¶
Index ¶
- func DaysFromDuration(duration *durationpb.Duration) int
- func DaysInt32FromDuration(duration *durationpb.Duration) int32
- func DurationFromDays(d int32) *durationpb.Duration
- func DurationFromHours(h int64) *durationpb.Duration
- func DurationFromMinutes(m int64) *durationpb.Duration
- func DurationFromSeconds(s int64) *durationpb.Duration
- func DurationPtr(td time.Duration) *durationpb.Duration
- func DurationValue(d *durationpb.Duration) time.Duration
- func MinDurationPtr(d1 *durationpb.Duration, d2 *durationpb.Duration) *durationpb.Duration
- func ParseDuration(s string) (time.Duration, error)
- func ParseDurationDefaultDays(s string) (time.Duration, error)
- func ParseDurationDefaultSeconds(s string) (time.Duration, error)
- func ParseHHMMSSDuration(d string) (time.Duration, error)
- func RoundUp(d time.Duration) time.Duration
- func TimeNowPtrUtc() *timestamppb.Timestamp
- func TimeNowPtrUtcAddDuration(t time.Duration) *timestamppb.Timestamp
- func TimeNowPtrUtcAddSeconds(seconds int) *timestamppb.Timestamp
- func TimePtr(t time.Time) *timestamppb.Timestamp
- func TimeValue(t *timestamppb.Timestamp) time.Time
- func UnixOrZeroTime(nanos int64) time.Time
- func UnixOrZeroTimePtr(nanos int64) *timestamppb.Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DaysFromDuration ¶ added in v0.28.0
func DaysFromDuration(duration *durationpb.Duration) int
func DaysInt32FromDuration ¶ added in v0.28.0
func DaysInt32FromDuration(duration *durationpb.Duration) int32
func DurationFromDays ¶ added in v0.28.0
func DurationFromDays(d int32) *durationpb.Duration
func DurationFromHours ¶ added in v0.28.0
func DurationFromHours(h int64) *durationpb.Duration
func DurationFromMinutes ¶ added in v0.28.0
func DurationFromMinutes(m int64) *durationpb.Duration
func DurationFromSeconds ¶ added in v0.28.0
func DurationFromSeconds(s int64) *durationpb.Duration
func DurationPtr ¶ added in v0.28.0
func DurationPtr(td time.Duration) *durationpb.Duration
func DurationValue ¶ added in v0.28.0
func DurationValue(d *durationpb.Duration) time.Duration
func MinDurationPtr ¶ added in v0.28.0
func MinDurationPtr(d1 *durationpb.Duration, d2 *durationpb.Duration) *durationpb.Duration
func ParseDuration ¶ added in v1.11.0
ParseDuration is like time.ParseDuration, but supports unit "d" for days (always interpreted as exactly 24 hours).
func ParseDurationDefaultDays ¶ added in v1.11.0
ParseDurationDefaultDays is like time.ParseDuration, but supports unit "d" for days (always interpreted as exactly 24 hours), and also supports unit-less numbers, which are interpreted as days.
func ParseDurationDefaultSeconds ¶ added in v1.21.0
ParseDurationDefaultSeconds is like time.ParseDuration, but supports unit "d" for days (always interpreted as exactly 24 hours), and also supports unit-less numbers, which are interpreted as seconds.
func ParseHHMMSSDuration ¶ added in v1.23.0
func TimeNowPtrUtc ¶ added in v0.28.0
func TimeNowPtrUtc() *timestamppb.Timestamp
func TimeNowPtrUtcAddDuration ¶ added in v0.28.0
func TimeNowPtrUtcAddDuration(t time.Duration) *timestamppb.Timestamp
func TimeNowPtrUtcAddSeconds ¶ added in v0.28.0
func TimeNowPtrUtcAddSeconds(seconds int) *timestamppb.Timestamp
func UnixOrZeroTime ¶ added in v0.28.0
func UnixOrZeroTimePtr ¶ added in v0.28.0
func UnixOrZeroTimePtr(nanos int64) *timestamppb.Timestamp
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.