prototime

package
v0.0.0-...-c5da4db Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2017 License: MIT Imports: 2 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationFromProto

func DurationFromProto(duration *google_protobuf.Duration) time.Duration

DurationFromProto converts a protobuf Duration to a go Duration.

func DurationToProto

func DurationToProto(d time.Duration) *google_protobuf.Duration

DurationToProto converts a go Duration to a protobuf Duration.

func Now

func Now() *google_protobuf.Timestamp

Now returns the current time as a protobuf Timestamp.

func TimeToTimestamp

func TimeToTimestamp(t time.Time) *google_protobuf.Timestamp

TimeToTimestamp converts a go Time to a protobuf Timestamp.

func TimestampLess

func TimestampLess(i *google_protobuf.Timestamp, j *google_protobuf.Timestamp) bool

TimestampLess returns true if i is before j.

func TimestampToTime

func TimestampToTime(timestamp *google_protobuf.Timestamp) time.Time

TimestampToTime converts a protobuf Timestamp to a go Time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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