|
|
@@ -0,0 +1,106 @@
|
|
|
+// Code generated by protoc-gen-go.
|
|
|
+// source: github.com/golang/protobuf/types/duration/duration.proto
|
|
|
+// DO NOT EDIT!
|
|
|
+
|
|
|
+/*
|
|
|
+Package duration is a generated protocol buffer package.
|
|
|
+
|
|
|
+It is generated from these files:
|
|
|
+ github.com/golang/protobuf/types/duration/duration.proto
|
|
|
+
|
|
|
+It has these top-level messages:
|
|
|
+ Duration
|
|
|
+*/
|
|
|
+package duration
|
|
|
+
|
|
|
+import proto "github.com/golang/protobuf/proto"
|
|
|
+import fmt "fmt"
|
|
|
+import math "math"
|
|
|
+
|
|
|
+// Reference imports to suppress errors if they are not otherwise used.
|
|
|
+var _ = proto.Marshal
|
|
|
+var _ = fmt.Errorf
|
|
|
+var _ = math.Inf
|
|
|
+
|
|
|
+// This is a compile-time assertion to ensure that this generated file
|
|
|
+// is compatible with the proto package it is being compiled against.
|
|
|
+const _ = proto.ProtoPackageIsVersion1
|
|
|
+
|
|
|
+// A Duration represents a signed, fixed-length span of time represented
|
|
|
+// as a count of seconds and fractions of seconds at nanosecond
|
|
|
+// resolution. It is independent of any calendar and concepts like "day"
|
|
|
+// or "month". It is related to Timestamp in that the difference between
|
|
|
+// two Timestamp values is a Duration and it can be added or subtracted
|
|
|
+// from a Timestamp. Range is approximately +-10,000 years.
|
|
|
+//
|
|
|
+// Example 1: Compute Duration from two Timestamps in pseudo code.
|
|
|
+//
|
|
|
+// Timestamp start = ...;
|
|
|
+// Timestamp end = ...;
|
|
|
+// Duration duration = ...;
|
|
|
+//
|
|
|
+// duration.seconds = end.seconds - start.seconds;
|
|
|
+// duration.nanos = end.nanos - start.nanos;
|
|
|
+//
|
|
|
+// if (duration.seconds < 0 && duration.nanos > 0) {
|
|
|
+// duration.seconds += 1;
|
|
|
+// duration.nanos -= 1000000000;
|
|
|
+// } else if (durations.seconds > 0 && duration.nanos < 0) {
|
|
|
+// duration.seconds -= 1;
|
|
|
+// duration.nanos += 1000000000;
|
|
|
+// }
|
|
|
+//
|
|
|
+// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
|
|
+//
|
|
|
+// Timestamp start = ...;
|
|
|
+// Duration duration = ...;
|
|
|
+// Timestamp end = ...;
|
|
|
+//
|
|
|
+// end.seconds = start.seconds + duration.seconds;
|
|
|
+// end.nanos = start.nanos + duration.nanos;
|
|
|
+//
|
|
|
+// if (end.nanos < 0) {
|
|
|
+// end.seconds -= 1;
|
|
|
+// end.nanos += 1000000000;
|
|
|
+// } else if (end.nanos >= 1000000000) {
|
|
|
+// end.seconds += 1;
|
|
|
+// end.nanos -= 1000000000;
|
|
|
+// }
|
|
|
+//
|
|
|
+type Duration struct {
|
|
|
+ // Signed seconds of the span of time. Must be from -315,576,000,000
|
|
|
+ // to +315,576,000,000 inclusive.
|
|
|
+ Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
|
|
|
+ // Signed fractions of a second at nanosecond resolution of the span
|
|
|
+ // of time. Durations less than one second are represented with a 0
|
|
|
+ // `seconds` field and a positive or negative `nanos` field. For durations
|
|
|
+ // of one second or more, a non-zero value for the `nanos` field must be
|
|
|
+ // of the same sign as the `seconds` field. Must be from -999,999,999
|
|
|
+ // to +999,999,999 inclusive.
|
|
|
+ Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Duration) Reset() { *m = Duration{} }
|
|
|
+func (m *Duration) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*Duration) ProtoMessage() {}
|
|
|
+func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
+
|
|
|
+func init() {
|
|
|
+ proto.RegisterType((*Duration)(nil), "google.protobuf.Duration")
|
|
|
+}
|
|
|
+
|
|
|
+var fileDescriptor0 = []byte{
|
|
|
+ // 186 bytes of a gzipped FileDescriptorProto
|
|
|
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 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