timefail.pb.go 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: timefail.proto
  3. /*
  4. Package timefail is a generated protocol buffer package.
  5. It is generated from these files:
  6. timefail.proto
  7. It has these top-level messages:
  8. TimeFail
  9. */
  10. package timefail
  11. import proto "github.com/gogo/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. import _ "github.com/gogo/protobuf/gogoproto"
  15. import _ "github.com/gogo/protobuf/types"
  16. import time "time"
  17. import strings "strings"
  18. import reflect "reflect"
  19. import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  20. import io "io"
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ = proto.Marshal
  23. var _ = fmt.Errorf
  24. var _ = math.Inf
  25. var _ = time.Kitchen
  26. // This is a compile-time assertion to ensure that this generated file
  27. // is compatible with the proto package it is being compiled against.
  28. // A compilation error at this line likely means your copy of the
  29. // proto package needs to be updated.
  30. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  31. type TimeFail struct {
  32. TimeTest *time.Time `protobuf:"bytes,1,opt,name=time_test,json=timeTest,stdtime" json:"time_test,omitempty"`
  33. }
  34. func (m *TimeFail) Reset() { *m = TimeFail{} }
  35. func (*TimeFail) ProtoMessage() {}
  36. func (*TimeFail) Descriptor() ([]byte, []int) { return fileDescriptorTimefail, []int{0} }
  37. func (m *TimeFail) GetTimeTest() *time.Time {
  38. if m != nil {
  39. return m.TimeTest
  40. }
  41. return nil
  42. }
  43. func init() {
  44. proto.RegisterType((*TimeFail)(nil), "timefail.TimeFail")
  45. }
  46. func (this *TimeFail) Equal(that interface{}) bool {
  47. if that == nil {
  48. if this == nil {
  49. return true
  50. }
  51. return false
  52. }
  53. that1, ok := that.(*TimeFail)
  54. if !ok {
  55. that2, ok := that.(TimeFail)
  56. if ok {
  57. that1 = &that2
  58. } else {
  59. return false
  60. }
  61. }
  62. if that1 == nil {
  63. if this == nil {
  64. return true
  65. }
  66. return false
  67. } else if this == nil {
  68. return false
  69. }
  70. if that1.TimeTest == nil {
  71. if this.TimeTest != nil {
  72. return false
  73. }
  74. } else if !this.TimeTest.Equal(*that1.TimeTest) {
  75. return false
  76. }
  77. return true
  78. }
  79. func (this *TimeFail) GoString() string {
  80. if this == nil {
  81. return "nil"
  82. }
  83. s := make([]string, 0, 5)
  84. s = append(s, "&timefail.TimeFail{")
  85. s = append(s, "TimeTest: "+fmt.Sprintf("%#v", this.TimeTest)+",\n")
  86. s = append(s, "}")
  87. return strings.Join(s, "")
  88. }
  89. func valueToGoStringTimefail(v interface{}, typ string) string {
  90. rv := reflect.ValueOf(v)
  91. if rv.IsNil() {
  92. return "nil"
  93. }
  94. pv := reflect.Indirect(rv).Interface()
  95. return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
  96. }
  97. func (m *TimeFail) Marshal() (dAtA []byte, err error) {
  98. size := m.Size()
  99. dAtA = make([]byte, size)
  100. n, err := m.MarshalTo(dAtA)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return dAtA[:n], nil
  105. }
  106. func (m *TimeFail) MarshalTo(dAtA []byte) (int, error) {
  107. var i int
  108. _ = i
  109. var l int
  110. _ = l
  111. if m.TimeTest != nil {
  112. dAtA[i] = 0xa
  113. i++
  114. i = encodeVarintTimefail(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.TimeTest)))
  115. n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.TimeTest, dAtA[i:])
  116. if err != nil {
  117. return 0, err
  118. }
  119. i += n1
  120. }
  121. return i, nil
  122. }
  123. func encodeVarintTimefail(dAtA []byte, offset int, v uint64) int {
  124. for v >= 1<<7 {
  125. dAtA[offset] = uint8(v&0x7f | 0x80)
  126. v >>= 7
  127. offset++
  128. }
  129. dAtA[offset] = uint8(v)
  130. return offset + 1
  131. }
  132. func (m *TimeFail) Size() (n int) {
  133. var l int
  134. _ = l
  135. if m.TimeTest != nil {
  136. l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.TimeTest)
  137. n += 1 + l + sovTimefail(uint64(l))
  138. }
  139. return n
  140. }
  141. func sovTimefail(x uint64) (n int) {
  142. for {
  143. n++
  144. x >>= 7
  145. if x == 0 {
  146. break
  147. }
  148. }
  149. return n
  150. }
  151. func sozTimefail(x uint64) (n int) {
  152. return sovTimefail(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  153. }
  154. func (this *TimeFail) String() string {
  155. if this == nil {
  156. return "nil"
  157. }
  158. s := strings.Join([]string{`&TimeFail{`,
  159. `TimeTest:` + strings.Replace(fmt.Sprintf("%v", this.TimeTest), "Timestamp", "google_protobuf1.Timestamp", 1) + `,`,
  160. `}`,
  161. }, "")
  162. return s
  163. }
  164. func valueToStringTimefail(v interface{}) string {
  165. rv := reflect.ValueOf(v)
  166. if rv.IsNil() {
  167. return "nil"
  168. }
  169. pv := reflect.Indirect(rv).Interface()
  170. return fmt.Sprintf("*%v", pv)
  171. }
  172. func (m *TimeFail) Unmarshal(dAtA []byte) error {
  173. l := len(dAtA)
  174. iNdEx := 0
  175. for iNdEx < l {
  176. preIndex := iNdEx
  177. var wire uint64
  178. for shift := uint(0); ; shift += 7 {
  179. if shift >= 64 {
  180. return ErrIntOverflowTimefail
  181. }
  182. if iNdEx >= l {
  183. return io.ErrUnexpectedEOF
  184. }
  185. b := dAtA[iNdEx]
  186. iNdEx++
  187. wire |= (uint64(b) & 0x7F) << shift
  188. if b < 0x80 {
  189. break
  190. }
  191. }
  192. fieldNum := int32(wire >> 3)
  193. wireType := int(wire & 0x7)
  194. if wireType == 4 {
  195. return fmt.Errorf("proto: TimeFail: wiretype end group for non-group")
  196. }
  197. if fieldNum <= 0 {
  198. return fmt.Errorf("proto: TimeFail: illegal tag %d (wire type %d)", fieldNum, wire)
  199. }
  200. switch fieldNum {
  201. case 1:
  202. if wireType != 2 {
  203. return fmt.Errorf("proto: wrong wireType = %d for field TimeTest", wireType)
  204. }
  205. var msglen int
  206. for shift := uint(0); ; shift += 7 {
  207. if shift >= 64 {
  208. return ErrIntOverflowTimefail
  209. }
  210. if iNdEx >= l {
  211. return io.ErrUnexpectedEOF
  212. }
  213. b := dAtA[iNdEx]
  214. iNdEx++
  215. msglen |= (int(b) & 0x7F) << shift
  216. if b < 0x80 {
  217. break
  218. }
  219. }
  220. if msglen < 0 {
  221. return ErrInvalidLengthTimefail
  222. }
  223. postIndex := iNdEx + msglen
  224. if postIndex > l {
  225. return io.ErrUnexpectedEOF
  226. }
  227. if m.TimeTest == nil {
  228. m.TimeTest = new(time.Time)
  229. }
  230. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.TimeTest, dAtA[iNdEx:postIndex]); err != nil {
  231. return err
  232. }
  233. iNdEx = postIndex
  234. default:
  235. iNdEx = preIndex
  236. skippy, err := skipTimefail(dAtA[iNdEx:])
  237. if err != nil {
  238. return err
  239. }
  240. if skippy < 0 {
  241. return ErrInvalidLengthTimefail
  242. }
  243. if (iNdEx + skippy) > l {
  244. return io.ErrUnexpectedEOF
  245. }
  246. iNdEx += skippy
  247. }
  248. }
  249. if iNdEx > l {
  250. return io.ErrUnexpectedEOF
  251. }
  252. return nil
  253. }
  254. func skipTimefail(dAtA []byte) (n int, err error) {
  255. l := len(dAtA)
  256. iNdEx := 0
  257. for iNdEx < l {
  258. var wire uint64
  259. for shift := uint(0); ; shift += 7 {
  260. if shift >= 64 {
  261. return 0, ErrIntOverflowTimefail
  262. }
  263. if iNdEx >= l {
  264. return 0, io.ErrUnexpectedEOF
  265. }
  266. b := dAtA[iNdEx]
  267. iNdEx++
  268. wire |= (uint64(b) & 0x7F) << shift
  269. if b < 0x80 {
  270. break
  271. }
  272. }
  273. wireType := int(wire & 0x7)
  274. switch wireType {
  275. case 0:
  276. for shift := uint(0); ; shift += 7 {
  277. if shift >= 64 {
  278. return 0, ErrIntOverflowTimefail
  279. }
  280. if iNdEx >= l {
  281. return 0, io.ErrUnexpectedEOF
  282. }
  283. iNdEx++
  284. if dAtA[iNdEx-1] < 0x80 {
  285. break
  286. }
  287. }
  288. return iNdEx, nil
  289. case 1:
  290. iNdEx += 8
  291. return iNdEx, nil
  292. case 2:
  293. var length int
  294. for shift := uint(0); ; shift += 7 {
  295. if shift >= 64 {
  296. return 0, ErrIntOverflowTimefail
  297. }
  298. if iNdEx >= l {
  299. return 0, io.ErrUnexpectedEOF
  300. }
  301. b := dAtA[iNdEx]
  302. iNdEx++
  303. length |= (int(b) & 0x7F) << shift
  304. if b < 0x80 {
  305. break
  306. }
  307. }
  308. iNdEx += length
  309. if length < 0 {
  310. return 0, ErrInvalidLengthTimefail
  311. }
  312. return iNdEx, nil
  313. case 3:
  314. for {
  315. var innerWire uint64
  316. var start int = iNdEx
  317. for shift := uint(0); ; shift += 7 {
  318. if shift >= 64 {
  319. return 0, ErrIntOverflowTimefail
  320. }
  321. if iNdEx >= l {
  322. return 0, io.ErrUnexpectedEOF
  323. }
  324. b := dAtA[iNdEx]
  325. iNdEx++
  326. innerWire |= (uint64(b) & 0x7F) << shift
  327. if b < 0x80 {
  328. break
  329. }
  330. }
  331. innerWireType := int(innerWire & 0x7)
  332. if innerWireType == 4 {
  333. break
  334. }
  335. next, err := skipTimefail(dAtA[start:])
  336. if err != nil {
  337. return 0, err
  338. }
  339. iNdEx = start + next
  340. }
  341. return iNdEx, nil
  342. case 4:
  343. return iNdEx, nil
  344. case 5:
  345. iNdEx += 4
  346. return iNdEx, nil
  347. default:
  348. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  349. }
  350. }
  351. panic("unreachable")
  352. }
  353. var (
  354. ErrInvalidLengthTimefail = fmt.Errorf("proto: negative length found during unmarshaling")
  355. ErrIntOverflowTimefail = fmt.Errorf("proto: integer overflow")
  356. )
  357. func init() { proto.RegisterFile("timefail.proto", fileDescriptorTimefail) }
  358. var fileDescriptorTimefail = []byte{
  359. // 202 bytes of a gzipped FileDescriptorProto
  360. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0xc9, 0xcc, 0x4d,
  361. 0x4d, 0x4b, 0xcc, 0xcc, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74,
  362. 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5,
  363. 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4f, 0xcf,
  364. 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x02, 0x19, 0x54, 0x5c, 0x92, 0x98, 0x5b, 0x00, 0x51, 0xa0,
  365. 0xe4, 0xc9, 0xc5, 0x11, 0x92, 0x99, 0x9b, 0xea, 0x96, 0x98, 0x99, 0x23, 0x64, 0xcb, 0xc5, 0x09,
  366. 0x92, 0x8e, 0x2f, 0x49, 0x2d, 0x2e, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd2, 0x83,
  367. 0x18, 0xa0, 0x07, 0x33, 0x40, 0x2f, 0x04, 0x66, 0x80, 0x13, 0xcb, 0x84, 0xfb, 0xf2, 0x8c, 0x41,
  368. 0x60, 0xa7, 0x85, 0xa4, 0x16, 0x97, 0x38, 0xe9, 0x5c, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c,
  369. 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x0d, 0x8f, 0xe4, 0x18, 0x57, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48,
  370. 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x5f, 0x3c, 0x92, 0x63, 0xf8, 0xf0,
  371. 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0x89, 0xc6, 0x80, 0x00, 0x00, 0x00,
  372. 0xff, 0xff, 0xc3, 0xd6, 0xbd, 0x67, 0xeb, 0x00, 0x00, 0x00,
  373. }