MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / ProtoTime

Function ProtoTime

pkg/ttnpb/stdtime.go:47–52  ·  view source on GitHub ↗

ProtoTime converts a standard library time to a protobuf timestamp. ProtoTime panics if the time is invalid.

(stdTime *time.Time)

Source from the content-addressed store, hash-verified

45//
46// ProtoTime panics if the time is invalid.
47func ProtoTime(stdTime *time.Time) *timestamppb.Timestamp {
48 if stdTime == nil {
49 return nil
50 }
51 return timestamppb.New(*stdTime)
52}

Callers 15

toPBUplinkFunction · 0.92
TestScheduleAnytimeShortFunction · 0.92
UplinkTokenFunction · 0.92
TestTrafficFunction · 0.92
toUplinkMessageMethod · 0.92
toUplinkMessageMethod · 0.92
TestUsersCRUDFunction · 0.92
GenerateAPIKeyFunction · 0.92
TestEndDeviceCACMethod · 0.92

Calls 1

NewMethod · 0.65

Tested by 7

TestScheduleAnytimeShortFunction · 0.74
TestTrafficFunction · 0.74
TestUsersCRUDFunction · 0.74
TestLastSeenWriteFunction · 0.74