Documentation ¶
Overview ¶
Package google contains utility methods to help interface between Google standard protobufs and native Go types.
Index ¶
- func DurationFromProto(d *duration.Duration) time.Duration
- func LoadDuration(d *duration.Duration, v time.Duration) *duration.Duration
- func LoadTimestamp(t *timestamp.Timestamp, v time.Time) *timestamp.Timestamp
- func NewDuration(v time.Duration) *duration.Duration
- func NewTimestamp(v time.Time) *timestamp.Timestamp
- func TimeFromProto(t *timestamp.Timestamp) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationFromProto ¶
DurationFromProto returns the time.Duration associated with a Duration protobuf.
func LoadDuration ¶
LoadDuration replaces the value in the supplied Duration with the specified value.
If the supplied Duration is nil and the value is non-zero, a new Duration will be generated. The populated Duration will be returned.
func LoadTimestamp ¶
LoadTimestamp replaces the value in the supplied Timestamp with the specified time.
If the supplied Timestamp is nil and the time is non-zero, a new Timestamp will be generated. The populated Timestamp will be returned.
func NewDuration ¶
NewDuration creates a new Duration protobuf from a time.Duration.
func NewTimestamp ¶
NewTimestamp creates a new Timestamp protobuf from a time.Time type.
Types ¶
This section is empty.