locs.pb.go 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: locs.proto
  3. /*
  4. Package model is a generated protocol buffer package.
  5. It is generated from these files:
  6. locs.proto
  7. It has these top-level messages:
  8. Locs
  9. */
  10. package model
  11. import proto "github.com/golang/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. import _ "github.com/gogo/protobuf/gogoproto"
  15. import io "io"
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. // This is a compile-time assertion to ensure that this generated file
  21. // is compatible with the proto package it is being compiled against.
  22. // A compilation error at this line likely means your copy of the
  23. // proto package needs to be updated.
  24. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  25. type Locs struct {
  26. LocsCount map[int64]int64 `protobuf:"bytes,1,rep,name=locsCount" json:"locsCount,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
  27. }
  28. func (m *Locs) Reset() { *m = Locs{} }
  29. func (m *Locs) String() string { return proto.CompactTextString(m) }
  30. func (*Locs) ProtoMessage() {}
  31. func (*Locs) Descriptor() ([]byte, []int) { return fileDescriptorLocs, []int{0} }
  32. func init() {
  33. proto.RegisterType((*Locs)(nil), "model.Locs")
  34. }
  35. func (m *Locs) Marshal() (dAtA []byte, err error) {
  36. size := m.Size()
  37. dAtA = make([]byte, size)
  38. n, err := m.MarshalTo(dAtA)
  39. if err != nil {
  40. return nil, err
  41. }
  42. return dAtA[:n], nil
  43. }
  44. func (m *Locs) MarshalTo(dAtA []byte) (int, error) {
  45. var i int
  46. _ = i
  47. var l int
  48. _ = l
  49. if len(m.LocsCount) > 0 {
  50. for k, _ := range m.LocsCount {
  51. dAtA[i] = 0xa
  52. i++
  53. v := m.LocsCount[k]
  54. mapSize := 1 + sovLocs(uint64(k)) + 1 + sovLocs(uint64(v))
  55. i = encodeVarintLocs(dAtA, i, uint64(mapSize))
  56. dAtA[i] = 0x8
  57. i++
  58. i = encodeVarintLocs(dAtA, i, uint64(k))
  59. dAtA[i] = 0x10
  60. i++
  61. i = encodeVarintLocs(dAtA, i, uint64(v))
  62. }
  63. }
  64. return i, nil
  65. }
  66. func encodeFixed64Locs(dAtA []byte, offset int, v uint64) int {
  67. dAtA[offset] = uint8(v)
  68. dAtA[offset+1] = uint8(v >> 8)
  69. dAtA[offset+2] = uint8(v >> 16)
  70. dAtA[offset+3] = uint8(v >> 24)
  71. dAtA[offset+4] = uint8(v >> 32)
  72. dAtA[offset+5] = uint8(v >> 40)
  73. dAtA[offset+6] = uint8(v >> 48)
  74. dAtA[offset+7] = uint8(v >> 56)
  75. return offset + 8
  76. }
  77. func encodeFixed32Locs(dAtA []byte, offset int, v uint32) int {
  78. dAtA[offset] = uint8(v)
  79. dAtA[offset+1] = uint8(v >> 8)
  80. dAtA[offset+2] = uint8(v >> 16)
  81. dAtA[offset+3] = uint8(v >> 24)
  82. return offset + 4
  83. }
  84. func encodeVarintLocs(dAtA []byte, offset int, v uint64) int {
  85. for v >= 1<<7 {
  86. dAtA[offset] = uint8(v&0x7f | 0x80)
  87. v >>= 7
  88. offset++
  89. }
  90. dAtA[offset] = uint8(v)
  91. return offset + 1
  92. }
  93. func (m *Locs) Size() (n int) {
  94. var l int
  95. _ = l
  96. if len(m.LocsCount) > 0 {
  97. for k, v := range m.LocsCount {
  98. _ = k
  99. _ = v
  100. mapEntrySize := 1 + sovLocs(uint64(k)) + 1 + sovLocs(uint64(v))
  101. n += mapEntrySize + 1 + sovLocs(uint64(mapEntrySize))
  102. }
  103. }
  104. return n
  105. }
  106. func sovLocs(x uint64) (n int) {
  107. for {
  108. n++
  109. x >>= 7
  110. if x == 0 {
  111. break
  112. }
  113. }
  114. return n
  115. }
  116. func sozLocs(x uint64) (n int) {
  117. return sovLocs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  118. }
  119. func (m *Locs) Unmarshal(dAtA []byte) error {
  120. l := len(dAtA)
  121. iNdEx := 0
  122. for iNdEx < l {
  123. preIndex := iNdEx
  124. var wire uint64
  125. for shift := uint(0); ; shift += 7 {
  126. if shift >= 64 {
  127. return ErrIntOverflowLocs
  128. }
  129. if iNdEx >= l {
  130. return io.ErrUnexpectedEOF
  131. }
  132. b := dAtA[iNdEx]
  133. iNdEx++
  134. wire |= (uint64(b) & 0x7F) << shift
  135. if b < 0x80 {
  136. break
  137. }
  138. }
  139. fieldNum := int32(wire >> 3)
  140. wireType := int(wire & 0x7)
  141. if wireType == 4 {
  142. return fmt.Errorf("proto: Locs: wiretype end group for non-group")
  143. }
  144. if fieldNum <= 0 {
  145. return fmt.Errorf("proto: Locs: illegal tag %d (wire type %d)", fieldNum, wire)
  146. }
  147. switch fieldNum {
  148. case 1:
  149. if wireType != 2 {
  150. return fmt.Errorf("proto: wrong wireType = %d for field LocsCount", wireType)
  151. }
  152. var msglen int
  153. for shift := uint(0); ; shift += 7 {
  154. if shift >= 64 {
  155. return ErrIntOverflowLocs
  156. }
  157. if iNdEx >= l {
  158. return io.ErrUnexpectedEOF
  159. }
  160. b := dAtA[iNdEx]
  161. iNdEx++
  162. msglen |= (int(b) & 0x7F) << shift
  163. if b < 0x80 {
  164. break
  165. }
  166. }
  167. if msglen < 0 {
  168. return ErrInvalidLengthLocs
  169. }
  170. postIndex := iNdEx + msglen
  171. if postIndex > l {
  172. return io.ErrUnexpectedEOF
  173. }
  174. if m.LocsCount == nil {
  175. m.LocsCount = make(map[int64]int64)
  176. }
  177. var mapkey int64
  178. var mapvalue int64
  179. for iNdEx < postIndex {
  180. entryPreIndex := iNdEx
  181. var wire uint64
  182. for shift := uint(0); ; shift += 7 {
  183. if shift >= 64 {
  184. return ErrIntOverflowLocs
  185. }
  186. if iNdEx >= l {
  187. return io.ErrUnexpectedEOF
  188. }
  189. b := dAtA[iNdEx]
  190. iNdEx++
  191. wire |= (uint64(b) & 0x7F) << shift
  192. if b < 0x80 {
  193. break
  194. }
  195. }
  196. fieldNum := int32(wire >> 3)
  197. if fieldNum == 1 {
  198. for shift := uint(0); ; shift += 7 {
  199. if shift >= 64 {
  200. return ErrIntOverflowLocs
  201. }
  202. if iNdEx >= l {
  203. return io.ErrUnexpectedEOF
  204. }
  205. b := dAtA[iNdEx]
  206. iNdEx++
  207. mapkey |= (int64(b) & 0x7F) << shift
  208. if b < 0x80 {
  209. break
  210. }
  211. }
  212. } else if fieldNum == 2 {
  213. for shift := uint(0); ; shift += 7 {
  214. if shift >= 64 {
  215. return ErrIntOverflowLocs
  216. }
  217. if iNdEx >= l {
  218. return io.ErrUnexpectedEOF
  219. }
  220. b := dAtA[iNdEx]
  221. iNdEx++
  222. mapvalue |= (int64(b) & 0x7F) << shift
  223. if b < 0x80 {
  224. break
  225. }
  226. }
  227. } else {
  228. iNdEx = entryPreIndex
  229. skippy, err := skipLocs(dAtA[iNdEx:])
  230. if err != nil {
  231. return err
  232. }
  233. if skippy < 0 {
  234. return ErrInvalidLengthLocs
  235. }
  236. if (iNdEx + skippy) > postIndex {
  237. return io.ErrUnexpectedEOF
  238. }
  239. iNdEx += skippy
  240. }
  241. }
  242. m.LocsCount[mapkey] = mapvalue
  243. iNdEx = postIndex
  244. default:
  245. iNdEx = preIndex
  246. skippy, err := skipLocs(dAtA[iNdEx:])
  247. if err != nil {
  248. return err
  249. }
  250. if skippy < 0 {
  251. return ErrInvalidLengthLocs
  252. }
  253. if (iNdEx + skippy) > l {
  254. return io.ErrUnexpectedEOF
  255. }
  256. iNdEx += skippy
  257. }
  258. }
  259. if iNdEx > l {
  260. return io.ErrUnexpectedEOF
  261. }
  262. return nil
  263. }
  264. func skipLocs(dAtA []byte) (n int, err error) {
  265. l := len(dAtA)
  266. iNdEx := 0
  267. for iNdEx < l {
  268. var wire uint64
  269. for shift := uint(0); ; shift += 7 {
  270. if shift >= 64 {
  271. return 0, ErrIntOverflowLocs
  272. }
  273. if iNdEx >= l {
  274. return 0, io.ErrUnexpectedEOF
  275. }
  276. b := dAtA[iNdEx]
  277. iNdEx++
  278. wire |= (uint64(b) & 0x7F) << shift
  279. if b < 0x80 {
  280. break
  281. }
  282. }
  283. wireType := int(wire & 0x7)
  284. switch wireType {
  285. case 0:
  286. for shift := uint(0); ; shift += 7 {
  287. if shift >= 64 {
  288. return 0, ErrIntOverflowLocs
  289. }
  290. if iNdEx >= l {
  291. return 0, io.ErrUnexpectedEOF
  292. }
  293. iNdEx++
  294. if dAtA[iNdEx-1] < 0x80 {
  295. break
  296. }
  297. }
  298. return iNdEx, nil
  299. case 1:
  300. iNdEx += 8
  301. return iNdEx, nil
  302. case 2:
  303. var length int
  304. for shift := uint(0); ; shift += 7 {
  305. if shift >= 64 {
  306. return 0, ErrIntOverflowLocs
  307. }
  308. if iNdEx >= l {
  309. return 0, io.ErrUnexpectedEOF
  310. }
  311. b := dAtA[iNdEx]
  312. iNdEx++
  313. length |= (int(b) & 0x7F) << shift
  314. if b < 0x80 {
  315. break
  316. }
  317. }
  318. iNdEx += length
  319. if length < 0 {
  320. return 0, ErrInvalidLengthLocs
  321. }
  322. return iNdEx, nil
  323. case 3:
  324. for {
  325. var innerWire uint64
  326. var start int = iNdEx
  327. for shift := uint(0); ; shift += 7 {
  328. if shift >= 64 {
  329. return 0, ErrIntOverflowLocs
  330. }
  331. if iNdEx >= l {
  332. return 0, io.ErrUnexpectedEOF
  333. }
  334. b := dAtA[iNdEx]
  335. iNdEx++
  336. innerWire |= (uint64(b) & 0x7F) << shift
  337. if b < 0x80 {
  338. break
  339. }
  340. }
  341. innerWireType := int(innerWire & 0x7)
  342. if innerWireType == 4 {
  343. break
  344. }
  345. next, err := skipLocs(dAtA[start:])
  346. if err != nil {
  347. return 0, err
  348. }
  349. iNdEx = start + next
  350. }
  351. return iNdEx, nil
  352. case 4:
  353. return iNdEx, nil
  354. case 5:
  355. iNdEx += 4
  356. return iNdEx, nil
  357. default:
  358. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  359. }
  360. }
  361. panic("unreachable")
  362. }
  363. var (
  364. ErrInvalidLengthLocs = fmt.Errorf("proto: negative length found during unmarshaling")
  365. ErrIntOverflowLocs = fmt.Errorf("proto: integer overflow")
  366. )
  367. func init() { proto.RegisterFile("locs.proto", fileDescriptorLocs) }
  368. var fileDescriptorLocs = []byte{
  369. // 191 bytes of a gzipped FileDescriptorProto
  370. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xca, 0xc9, 0x4f, 0x2e,
  371. 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xcd, 0xcd, 0x4f, 0x49, 0xcd, 0x91, 0xd2, 0x4d,
  372. 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07,
  373. 0xcb, 0x26, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa5, 0x54, 0xc7, 0xc5, 0xe2,
  374. 0x93, 0x9f, 0x5c, 0x2c, 0x64, 0xc1, 0xc5, 0x09, 0x32, 0xcb, 0x39, 0xbf, 0x34, 0xaf, 0x44, 0x82,
  375. 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x4a, 0x0f, 0x6c, 0xa2, 0x1e, 0x48, 0x1e, 0x4c, 0x80, 0x25,
  376. 0x5d, 0xf3, 0x4a, 0x8a, 0x2a, 0x83, 0x10, 0x8a, 0xa5, 0x6c, 0xb8, 0xf8, 0x50, 0x25, 0x85, 0x04,
  377. 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x40, 0x4c, 0x21, 0x11,
  378. 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0xb0, 0x18, 0x84, 0x63, 0xc5, 0x64, 0xc1,
  379. 0xe8, 0x24, 0x71, 0xe2, 0xa1, 0x1c, 0xc3, 0x85, 0x87, 0x72, 0x0c, 0x27, 0x1e, 0xc9, 0x31, 0x5e,
  380. 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0x60, 0x07,
  381. 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x9f, 0x95, 0x78, 0xe4, 0x00, 0x00, 0x00,
  382. }