protox

package
v0.0.0-...-f038164 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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