Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ToDuration = durationpb.New
ToDuration converts a time.Duration to a protobuf duration.
Functions ¶
func PtrToTimestamp ¶
func PtrToTimestamp(t *time.Time) *timestamppb.Timestamp
PtrToTimestamp converts a pointer to a time.Time to a protobuf timestamp.
func SQLToTimestamp ¶
func SQLToTimestamp(t sql.NullTime) *timestamppb.Timestamp
SQLToTimestamp converts a sql.NullTime to a protobuf timestamp.
func ToTimestamp ¶
func ToTimestamp(t time.Time) *timestamppb.Timestamp
ToTimestamp converts a time.Time to a protobuf timestamp.
func UnixMilliToTimestamp ¶
func UnixMilliToTimestamp(t int64) *timestamppb.Timestamp
UnixMilliToTimestamp converts a unix milli timestamp to a protobuf timestamp.
func UnixToTimestamp ¶
func UnixToTimestamp(t int64) *timestamppb.Timestamp
UnixToTimestamp converts a unix timestamp to a protobuf timestamp.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.