Documentation ¶
Index ¶
- func PtrToTimestamp(t *time.Time) *timestamppb.Timestamp
- func SQLToTimestamp(t sql.NullTime) *timestamppb.Timestamp
- func ToDuration(d time.Duration) *durationpb.Duration
- func ToTimestamp(t time.Time) *timestamppb.Timestamp
- func UnixMilliToTimestamp(t int64) *timestamppb.Timestamp
- func UnixToTimestamp(t int64) *timestamppb.Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 ToDuration ¶
func ToDuration(d time.Duration) *durationpb.Duration
ToDuration converts a time.Duration to a protobuf duration.
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.