protox

package
v0.0.0-...-f2d4f82 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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