timestamp

package
v1.25.0-113.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: MIT Imports: 8 Imported by: 8

Documentation

Index

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

func ParseDuration(s string) (time.Duration, error)

ParseDuration is like time.ParseDuration, but supports unit "d" for days (always interpreted as exactly 24 hours).

func ParseDurationDefaultDays added in v1.11.0

func ParseDurationDefaultDays(s string) (time.Duration, error)

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

func ParseDurationDefaultSeconds(s string) (time.Duration, error)

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 ParseHHMMSSDuration(d string) (time.Duration, error)

func RoundUp added in v0.28.0

func RoundUp(d time.Duration) time.Duration

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 TimePtr added in v0.28.0

func TimePtr(t time.Time) *timestamppb.Timestamp

func TimeValue added in v0.28.0

func TimeValue(t *timestamppb.Timestamp) time.Time

func UnixOrZeroTime added in v0.28.0

func UnixOrZeroTime(nanos int64) time.Time

func UnixOrZeroTimePtr added in v0.28.0

func UnixOrZeroTimePtr(nanos int64) *timestamppb.Timestamp

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL