timepb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

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