Documentation
¶
Overview ¶
Package timepb provides conversions between Go time.Time and the protobuf Timestamp type. It lives outside any transport package so every consumer can import it without pulling in transport code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TimePointerToTimestamp ¶
func TimePointerToTimestamp(t *time.Time) *timestamppb.Timestamp
TimePointerToTimestamp converts a *time.Time to a *timestamppb.Timestamp, returning nil for nil or zero-time input so the wire encoding omits the field entirely.
func TimestampToTimePointer ¶
func TimestampToTimePointer(t *timestamppb.Timestamp) *time.Time
TimestampToTimePointer converts a *timestamppb.Timestamp to *time.Time, returning nil for nil / invalid / zero inputs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.