tarsum.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. // Code generated by protoc-gen-gogo.
  2. // source: tarsum.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package remotecontext is a generated protocol buffer package.
  6. It is generated from these files:
  7. tarsum.proto
  8. It has these top-level messages:
  9. TarsumBackup
  10. */
  11. package remotecontext
  12. import proto "github.com/gogo/protobuf/proto"
  13. import fmt "fmt"
  14. import math "math"
  15. import strings "strings"
  16. import reflect "reflect"
  17. import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
  18. import io "io"
  19. // Reference imports to suppress errors if they are not otherwise used.
  20. var _ = proto.Marshal
  21. var _ = fmt.Errorf
  22. var _ = math.Inf
  23. // This is a compile-time assertion to ensure that this generated file
  24. // is compatible with the proto package it is being compiled against.
  25. // A compilation error at this line likely means your copy of the
  26. // proto package needs to be updated.
  27. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  28. type TarsumBackup struct {
  29. Hashes map[string]string `protobuf:"bytes,1,rep,name=Hashes" json:"Hashes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  30. }
  31. func (m *TarsumBackup) Reset() { *m = TarsumBackup{} }
  32. func (*TarsumBackup) ProtoMessage() {}
  33. func (*TarsumBackup) Descriptor() ([]byte, []int) { return fileDescriptorTarsum, []int{0} }
  34. func (m *TarsumBackup) GetHashes() map[string]string {
  35. if m != nil {
  36. return m.Hashes
  37. }
  38. return nil
  39. }
  40. func init() {
  41. proto.RegisterType((*TarsumBackup)(nil), "remotecontext.TarsumBackup")
  42. }
  43. func (this *TarsumBackup) Equal(that interface{}) bool {
  44. if that == nil {
  45. if this == nil {
  46. return true
  47. }
  48. return false
  49. }
  50. that1, ok := that.(*TarsumBackup)
  51. if !ok {
  52. that2, ok := that.(TarsumBackup)
  53. if ok {
  54. that1 = &that2
  55. } else {
  56. return false
  57. }
  58. }
  59. if that1 == nil {
  60. if this == nil {
  61. return true
  62. }
  63. return false
  64. } else if this == nil {
  65. return false
  66. }
  67. if len(this.Hashes) != len(that1.Hashes) {
  68. return false
  69. }
  70. for i := range this.Hashes {
  71. if this.Hashes[i] != that1.Hashes[i] {
  72. return false
  73. }
  74. }
  75. return true
  76. }
  77. func (this *TarsumBackup) GoString() string {
  78. if this == nil {
  79. return "nil"
  80. }
  81. s := make([]string, 0, 5)
  82. s = append(s, "&remotecontext.TarsumBackup{")
  83. keysForHashes := make([]string, 0, len(this.Hashes))
  84. for k := range this.Hashes {
  85. keysForHashes = append(keysForHashes, k)
  86. }
  87. github_com_gogo_protobuf_sortkeys.Strings(keysForHashes)
  88. mapStringForHashes := "map[string]string{"
  89. for _, k := range keysForHashes {
  90. mapStringForHashes += fmt.Sprintf("%#v: %#v,", k, this.Hashes[k])
  91. }
  92. mapStringForHashes += "}"
  93. if this.Hashes != nil {
  94. s = append(s, "Hashes: "+mapStringForHashes+",\n")
  95. }
  96. s = append(s, "}")
  97. return strings.Join(s, "")
  98. }
  99. func valueToGoStringTarsum(v interface{}, typ string) string {
  100. rv := reflect.ValueOf(v)
  101. if rv.IsNil() {
  102. return "nil"
  103. }
  104. pv := reflect.Indirect(rv).Interface()
  105. return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
  106. }
  107. func (m *TarsumBackup) Marshal() (dAtA []byte, err error) {
  108. size := m.Size()
  109. dAtA = make([]byte, size)
  110. n, err := m.MarshalTo(dAtA)
  111. if err != nil {
  112. return nil, err
  113. }
  114. return dAtA[:n], nil
  115. }
  116. func (m *TarsumBackup) MarshalTo(dAtA []byte) (int, error) {
  117. var i int
  118. _ = i
  119. var l int
  120. _ = l
  121. if len(m.Hashes) > 0 {
  122. for k := range m.Hashes {
  123. dAtA[i] = 0xa
  124. i++
  125. v := m.Hashes[k]
  126. mapSize := 1 + len(k) + sovTarsum(uint64(len(k))) + 1 + len(v) + sovTarsum(uint64(len(v)))
  127. i = encodeVarintTarsum(dAtA, i, uint64(mapSize))
  128. dAtA[i] = 0xa
  129. i++
  130. i = encodeVarintTarsum(dAtA, i, uint64(len(k)))
  131. i += copy(dAtA[i:], k)
  132. dAtA[i] = 0x12
  133. i++
  134. i = encodeVarintTarsum(dAtA, i, uint64(len(v)))
  135. i += copy(dAtA[i:], v)
  136. }
  137. }
  138. return i, nil
  139. }
  140. func encodeFixed64Tarsum(dAtA []byte, offset int, v uint64) int {
  141. dAtA[offset] = uint8(v)
  142. dAtA[offset+1] = uint8(v >> 8)
  143. dAtA[offset+2] = uint8(v >> 16)
  144. dAtA[offset+3] = uint8(v >> 24)
  145. dAtA[offset+4] = uint8(v >> 32)
  146. dAtA[offset+5] = uint8(v >> 40)
  147. dAtA[offset+6] = uint8(v >> 48)
  148. dAtA[offset+7] = uint8(v >> 56)
  149. return offset + 8
  150. }
  151. func encodeFixed32Tarsum(dAtA []byte, offset int, v uint32) int {
  152. dAtA[offset] = uint8(v)
  153. dAtA[offset+1] = uint8(v >> 8)
  154. dAtA[offset+2] = uint8(v >> 16)
  155. dAtA[offset+3] = uint8(v >> 24)
  156. return offset + 4
  157. }
  158. func encodeVarintTarsum(dAtA []byte, offset int, v uint64) int {
  159. for v >= 1<<7 {
  160. dAtA[offset] = uint8(v&0x7f | 0x80)
  161. v >>= 7
  162. offset++
  163. }
  164. dAtA[offset] = uint8(v)
  165. return offset + 1
  166. }
  167. func (m *TarsumBackup) Size() (n int) {
  168. var l int
  169. _ = l
  170. if len(m.Hashes) > 0 {
  171. for k, v := range m.Hashes {
  172. _ = k
  173. _ = v
  174. mapEntrySize := 1 + len(k) + sovTarsum(uint64(len(k))) + 1 + len(v) + sovTarsum(uint64(len(v)))
  175. n += mapEntrySize + 1 + sovTarsum(uint64(mapEntrySize))
  176. }
  177. }
  178. return n
  179. }
  180. func sovTarsum(x uint64) (n int) {
  181. for {
  182. n++
  183. x >>= 7
  184. if x == 0 {
  185. break
  186. }
  187. }
  188. return n
  189. }
  190. func sozTarsum(x uint64) (n int) {
  191. return sovTarsum(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  192. }
  193. func (this *TarsumBackup) String() string {
  194. if this == nil {
  195. return "nil"
  196. }
  197. keysForHashes := make([]string, 0, len(this.Hashes))
  198. for k := range this.Hashes {
  199. keysForHashes = append(keysForHashes, k)
  200. }
  201. github_com_gogo_protobuf_sortkeys.Strings(keysForHashes)
  202. mapStringForHashes := "map[string]string{"
  203. for _, k := range keysForHashes {
  204. mapStringForHashes += fmt.Sprintf("%v: %v,", k, this.Hashes[k])
  205. }
  206. mapStringForHashes += "}"
  207. s := strings.Join([]string{`&TarsumBackup{`,
  208. `Hashes:` + mapStringForHashes + `,`,
  209. `}`,
  210. }, "")
  211. return s
  212. }
  213. func valueToStringTarsum(v interface{}) string {
  214. rv := reflect.ValueOf(v)
  215. if rv.IsNil() {
  216. return "nil"
  217. }
  218. pv := reflect.Indirect(rv).Interface()
  219. return fmt.Sprintf("*%v", pv)
  220. }
  221. func (m *TarsumBackup) Unmarshal(dAtA []byte) error {
  222. l := len(dAtA)
  223. iNdEx := 0
  224. for iNdEx < l {
  225. preIndex := iNdEx
  226. var wire uint64
  227. for shift := uint(0); ; shift += 7 {
  228. if shift >= 64 {
  229. return ErrIntOverflowTarsum
  230. }
  231. if iNdEx >= l {
  232. return io.ErrUnexpectedEOF
  233. }
  234. b := dAtA[iNdEx]
  235. iNdEx++
  236. wire |= (uint64(b) & 0x7F) << shift
  237. if b < 0x80 {
  238. break
  239. }
  240. }
  241. fieldNum := int32(wire >> 3)
  242. wireType := int(wire & 0x7)
  243. if wireType == 4 {
  244. return fmt.Errorf("proto: TarsumBackup: wiretype end group for non-group")
  245. }
  246. if fieldNum <= 0 {
  247. return fmt.Errorf("proto: TarsumBackup: illegal tag %d (wire type %d)", fieldNum, wire)
  248. }
  249. switch fieldNum {
  250. case 1:
  251. if wireType != 2 {
  252. return fmt.Errorf("proto: wrong wireType = %d for field Hashes", wireType)
  253. }
  254. var msglen int
  255. for shift := uint(0); ; shift += 7 {
  256. if shift >= 64 {
  257. return ErrIntOverflowTarsum
  258. }
  259. if iNdEx >= l {
  260. return io.ErrUnexpectedEOF
  261. }
  262. b := dAtA[iNdEx]
  263. iNdEx++
  264. msglen |= (int(b) & 0x7F) << shift
  265. if b < 0x80 {
  266. break
  267. }
  268. }
  269. if msglen < 0 {
  270. return ErrInvalidLengthTarsum
  271. }
  272. postIndex := iNdEx + msglen
  273. if postIndex > l {
  274. return io.ErrUnexpectedEOF
  275. }
  276. var keykey uint64
  277. for shift := uint(0); ; shift += 7 {
  278. if shift >= 64 {
  279. return ErrIntOverflowTarsum
  280. }
  281. if iNdEx >= l {
  282. return io.ErrUnexpectedEOF
  283. }
  284. b := dAtA[iNdEx]
  285. iNdEx++
  286. keykey |= (uint64(b) & 0x7F) << shift
  287. if b < 0x80 {
  288. break
  289. }
  290. }
  291. var stringLenmapkey uint64
  292. for shift := uint(0); ; shift += 7 {
  293. if shift >= 64 {
  294. return ErrIntOverflowTarsum
  295. }
  296. if iNdEx >= l {
  297. return io.ErrUnexpectedEOF
  298. }
  299. b := dAtA[iNdEx]
  300. iNdEx++
  301. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  302. if b < 0x80 {
  303. break
  304. }
  305. }
  306. intStringLenmapkey := int(stringLenmapkey)
  307. if intStringLenmapkey < 0 {
  308. return ErrInvalidLengthTarsum
  309. }
  310. postStringIndexmapkey := iNdEx + intStringLenmapkey
  311. if postStringIndexmapkey > l {
  312. return io.ErrUnexpectedEOF
  313. }
  314. mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
  315. iNdEx = postStringIndexmapkey
  316. if m.Hashes == nil {
  317. m.Hashes = make(map[string]string)
  318. }
  319. if iNdEx < postIndex {
  320. var valuekey uint64
  321. for shift := uint(0); ; shift += 7 {
  322. if shift >= 64 {
  323. return ErrIntOverflowTarsum
  324. }
  325. if iNdEx >= l {
  326. return io.ErrUnexpectedEOF
  327. }
  328. b := dAtA[iNdEx]
  329. iNdEx++
  330. valuekey |= (uint64(b) & 0x7F) << shift
  331. if b < 0x80 {
  332. break
  333. }
  334. }
  335. var stringLenmapvalue uint64
  336. for shift := uint(0); ; shift += 7 {
  337. if shift >= 64 {
  338. return ErrIntOverflowTarsum
  339. }
  340. if iNdEx >= l {
  341. return io.ErrUnexpectedEOF
  342. }
  343. b := dAtA[iNdEx]
  344. iNdEx++
  345. stringLenmapvalue |= (uint64(b) & 0x7F) << shift
  346. if b < 0x80 {
  347. break
  348. }
  349. }
  350. intStringLenmapvalue := int(stringLenmapvalue)
  351. if intStringLenmapvalue < 0 {
  352. return ErrInvalidLengthTarsum
  353. }
  354. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  355. if postStringIndexmapvalue > l {
  356. return io.ErrUnexpectedEOF
  357. }
  358. mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
  359. iNdEx = postStringIndexmapvalue
  360. m.Hashes[mapkey] = mapvalue
  361. } else {
  362. var mapvalue string
  363. m.Hashes[mapkey] = mapvalue
  364. }
  365. iNdEx = postIndex
  366. default:
  367. iNdEx = preIndex
  368. skippy, err := skipTarsum(dAtA[iNdEx:])
  369. if err != nil {
  370. return err
  371. }
  372. if skippy < 0 {
  373. return ErrInvalidLengthTarsum
  374. }
  375. if (iNdEx + skippy) > l {
  376. return io.ErrUnexpectedEOF
  377. }
  378. iNdEx += skippy
  379. }
  380. }
  381. if iNdEx > l {
  382. return io.ErrUnexpectedEOF
  383. }
  384. return nil
  385. }
  386. func skipTarsum(dAtA []byte) (n int, err error) {
  387. l := len(dAtA)
  388. iNdEx := 0
  389. for iNdEx < l {
  390. var wire uint64
  391. for shift := uint(0); ; shift += 7 {
  392. if shift >= 64 {
  393. return 0, ErrIntOverflowTarsum
  394. }
  395. if iNdEx >= l {
  396. return 0, io.ErrUnexpectedEOF
  397. }
  398. b := dAtA[iNdEx]
  399. iNdEx++
  400. wire |= (uint64(b) & 0x7F) << shift
  401. if b < 0x80 {
  402. break
  403. }
  404. }
  405. wireType := int(wire & 0x7)
  406. switch wireType {
  407. case 0:
  408. for shift := uint(0); ; shift += 7 {
  409. if shift >= 64 {
  410. return 0, ErrIntOverflowTarsum
  411. }
  412. if iNdEx >= l {
  413. return 0, io.ErrUnexpectedEOF
  414. }
  415. iNdEx++
  416. if dAtA[iNdEx-1] < 0x80 {
  417. break
  418. }
  419. }
  420. return iNdEx, nil
  421. case 1:
  422. iNdEx += 8
  423. return iNdEx, nil
  424. case 2:
  425. var length int
  426. for shift := uint(0); ; shift += 7 {
  427. if shift >= 64 {
  428. return 0, ErrIntOverflowTarsum
  429. }
  430. if iNdEx >= l {
  431. return 0, io.ErrUnexpectedEOF
  432. }
  433. b := dAtA[iNdEx]
  434. iNdEx++
  435. length |= (int(b) & 0x7F) << shift
  436. if b < 0x80 {
  437. break
  438. }
  439. }
  440. iNdEx += length
  441. if length < 0 {
  442. return 0, ErrInvalidLengthTarsum
  443. }
  444. return iNdEx, nil
  445. case 3:
  446. for {
  447. var innerWire uint64
  448. var start int = iNdEx
  449. for shift := uint(0); ; shift += 7 {
  450. if shift >= 64 {
  451. return 0, ErrIntOverflowTarsum
  452. }
  453. if iNdEx >= l {
  454. return 0, io.ErrUnexpectedEOF
  455. }
  456. b := dAtA[iNdEx]
  457. iNdEx++
  458. innerWire |= (uint64(b) & 0x7F) << shift
  459. if b < 0x80 {
  460. break
  461. }
  462. }
  463. innerWireType := int(innerWire & 0x7)
  464. if innerWireType == 4 {
  465. break
  466. }
  467. next, err := skipTarsum(dAtA[start:])
  468. if err != nil {
  469. return 0, err
  470. }
  471. iNdEx = start + next
  472. }
  473. return iNdEx, nil
  474. case 4:
  475. return iNdEx, nil
  476. case 5:
  477. iNdEx += 4
  478. return iNdEx, nil
  479. default:
  480. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  481. }
  482. }
  483. panic("unreachable")
  484. }
  485. var (
  486. ErrInvalidLengthTarsum = fmt.Errorf("proto: negative length found during unmarshaling")
  487. ErrIntOverflowTarsum = fmt.Errorf("proto: integer overflow")
  488. )
  489. func init() { proto.RegisterFile("tarsum.proto", fileDescriptorTarsum) }
  490. var fileDescriptorTarsum = []byte{
  491. // 196 bytes of a gzipped FileDescriptorProto
  492. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x49, 0x2c, 0x2a,
  493. 0x2e, 0xcd, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2d, 0x4a, 0xcd, 0xcd, 0x2f, 0x49,
  494. 0x4d, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0x51, 0xea, 0x62, 0xe4, 0xe2, 0x09, 0x01, 0xcb, 0x3b,
  495. 0x25, 0x26, 0x67, 0x97, 0x16, 0x08, 0xd9, 0x73, 0xb1, 0x79, 0x24, 0x16, 0x67, 0xa4, 0x16, 0x4b,
  496. 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x1b, 0xa9, 0xeb, 0xa1, 0x68, 0xd0, 0x43, 0x56, 0xac, 0x07, 0x51,
  497. 0xe9, 0x9a, 0x57, 0x52, 0x54, 0x19, 0x04, 0xd5, 0x26, 0x65, 0xc9, 0xc5, 0x8d, 0x24, 0x2c, 0x24,
  498. 0xc0, 0xc5, 0x9c, 0x9d, 0x5a, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x62, 0x0a, 0x89,
  499. 0x70, 0xb1, 0x96, 0x25, 0xe6, 0x94, 0xa6, 0x4a, 0x30, 0x81, 0xc5, 0x20, 0x1c, 0x2b, 0x26, 0x0b,
  500. 0x46, 0x27, 0x9d, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, 0x8e, 0xb1,
  501. 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7,
  502. 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c,
  503. 0xc7, 0x90, 0xc4, 0x06, 0xf6, 0x90, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x89, 0x57, 0x7d, 0x3f,
  504. 0xe0, 0x00, 0x00, 0x00,
  505. }