structs.pb.go 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: structs.proto
  3. /*
  4. Package db is a generated protocol buffer package.
  5. It is generated from these files:
  6. structs.proto
  7. It has these top-level messages:
  8. FileVersion
  9. VersionList
  10. FileInfoTruncated
  11. Counts
  12. CountsSet
  13. */
  14. package db
  15. import proto "github.com/gogo/protobuf/proto"
  16. import fmt "fmt"
  17. import math "math"
  18. import _ "github.com/gogo/protobuf/gogoproto"
  19. import protocol "github.com/syncthing/syncthing/lib/protocol"
  20. import github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
  21. import io "io"
  22. // Reference imports to suppress errors if they are not otherwise used.
  23. var _ = proto.Marshal
  24. var _ = fmt.Errorf
  25. var _ = math.Inf
  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 FileVersion struct {
  32. Version protocol.Vector `protobuf:"bytes,1,opt,name=version" json:"version"`
  33. Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
  34. Invalid bool `protobuf:"varint,3,opt,name=invalid,proto3" json:"invalid,omitempty"`
  35. }
  36. func (m *FileVersion) Reset() { *m = FileVersion{} }
  37. func (m *FileVersion) String() string { return proto.CompactTextString(m) }
  38. func (*FileVersion) ProtoMessage() {}
  39. func (*FileVersion) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{0} }
  40. type VersionList struct {
  41. Versions []FileVersion `protobuf:"bytes,1,rep,name=versions" json:"versions"`
  42. }
  43. func (m *VersionList) Reset() { *m = VersionList{} }
  44. func (*VersionList) ProtoMessage() {}
  45. func (*VersionList) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{1} }
  46. // Must be the same as FileInfo but without the blocks field
  47. type FileInfoTruncated struct {
  48. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  49. Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  50. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  51. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  52. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
  53. ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
  54. ModifiedBy github_com_syncthing_syncthing_lib_protocol.ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.ShortID" json:"modified_by"`
  55. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  56. Invalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  57. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  58. Version protocol.Vector `protobuf:"bytes,9,opt,name=version" json:"version"`
  59. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
  60. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"`
  61. }
  62. func (m *FileInfoTruncated) Reset() { *m = FileInfoTruncated{} }
  63. func (*FileInfoTruncated) ProtoMessage() {}
  64. func (*FileInfoTruncated) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{2} }
  65. // For each folder and device we keep one of these to track the current
  66. // counts and sequence. We also keep one for the global state of the folder.
  67. type Counts struct {
  68. Files int32 `protobuf:"varint,1,opt,name=files,proto3" json:"files,omitempty"`
  69. Directories int32 `protobuf:"varint,2,opt,name=directories,proto3" json:"directories,omitempty"`
  70. Symlinks int32 `protobuf:"varint,3,opt,name=symlinks,proto3" json:"symlinks,omitempty"`
  71. Deleted int32 `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
  72. Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"`
  73. Sequence int64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence,omitempty"`
  74. DeviceID []byte `protobuf:"bytes,17,opt,name=deviceID,proto3" json:"deviceID,omitempty"`
  75. }
  76. func (m *Counts) Reset() { *m = Counts{} }
  77. func (m *Counts) String() string { return proto.CompactTextString(m) }
  78. func (*Counts) ProtoMessage() {}
  79. func (*Counts) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{3} }
  80. type CountsSet struct {
  81. Counts []Counts `protobuf:"bytes,1,rep,name=counts" json:"counts"`
  82. Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"`
  83. }
  84. func (m *CountsSet) Reset() { *m = CountsSet{} }
  85. func (m *CountsSet) String() string { return proto.CompactTextString(m) }
  86. func (*CountsSet) ProtoMessage() {}
  87. func (*CountsSet) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{4} }
  88. func init() {
  89. proto.RegisterType((*FileVersion)(nil), "db.FileVersion")
  90. proto.RegisterType((*VersionList)(nil), "db.VersionList")
  91. proto.RegisterType((*FileInfoTruncated)(nil), "db.FileInfoTruncated")
  92. proto.RegisterType((*Counts)(nil), "db.Counts")
  93. proto.RegisterType((*CountsSet)(nil), "db.CountsSet")
  94. }
  95. func (m *FileVersion) Marshal() (dAtA []byte, err error) {
  96. size := m.ProtoSize()
  97. dAtA = make([]byte, size)
  98. n, err := m.MarshalTo(dAtA)
  99. if err != nil {
  100. return nil, err
  101. }
  102. return dAtA[:n], nil
  103. }
  104. func (m *FileVersion) MarshalTo(dAtA []byte) (int, error) {
  105. var i int
  106. _ = i
  107. var l int
  108. _ = l
  109. dAtA[i] = 0xa
  110. i++
  111. i = encodeVarintStructs(dAtA, i, uint64(m.Version.ProtoSize()))
  112. n1, err := m.Version.MarshalTo(dAtA[i:])
  113. if err != nil {
  114. return 0, err
  115. }
  116. i += n1
  117. if len(m.Device) > 0 {
  118. dAtA[i] = 0x12
  119. i++
  120. i = encodeVarintStructs(dAtA, i, uint64(len(m.Device)))
  121. i += copy(dAtA[i:], m.Device)
  122. }
  123. if m.Invalid {
  124. dAtA[i] = 0x18
  125. i++
  126. if m.Invalid {
  127. dAtA[i] = 1
  128. } else {
  129. dAtA[i] = 0
  130. }
  131. i++
  132. }
  133. return i, nil
  134. }
  135. func (m *VersionList) Marshal() (dAtA []byte, err error) {
  136. size := m.ProtoSize()
  137. dAtA = make([]byte, size)
  138. n, err := m.MarshalTo(dAtA)
  139. if err != nil {
  140. return nil, err
  141. }
  142. return dAtA[:n], nil
  143. }
  144. func (m *VersionList) MarshalTo(dAtA []byte) (int, error) {
  145. var i int
  146. _ = i
  147. var l int
  148. _ = l
  149. if len(m.Versions) > 0 {
  150. for _, msg := range m.Versions {
  151. dAtA[i] = 0xa
  152. i++
  153. i = encodeVarintStructs(dAtA, i, uint64(msg.ProtoSize()))
  154. n, err := msg.MarshalTo(dAtA[i:])
  155. if err != nil {
  156. return 0, err
  157. }
  158. i += n
  159. }
  160. }
  161. return i, nil
  162. }
  163. func (m *FileInfoTruncated) Marshal() (dAtA []byte, err error) {
  164. size := m.ProtoSize()
  165. dAtA = make([]byte, size)
  166. n, err := m.MarshalTo(dAtA)
  167. if err != nil {
  168. return nil, err
  169. }
  170. return dAtA[:n], nil
  171. }
  172. func (m *FileInfoTruncated) MarshalTo(dAtA []byte) (int, error) {
  173. var i int
  174. _ = i
  175. var l int
  176. _ = l
  177. if len(m.Name) > 0 {
  178. dAtA[i] = 0xa
  179. i++
  180. i = encodeVarintStructs(dAtA, i, uint64(len(m.Name)))
  181. i += copy(dAtA[i:], m.Name)
  182. }
  183. if m.Type != 0 {
  184. dAtA[i] = 0x10
  185. i++
  186. i = encodeVarintStructs(dAtA, i, uint64(m.Type))
  187. }
  188. if m.Size != 0 {
  189. dAtA[i] = 0x18
  190. i++
  191. i = encodeVarintStructs(dAtA, i, uint64(m.Size))
  192. }
  193. if m.Permissions != 0 {
  194. dAtA[i] = 0x20
  195. i++
  196. i = encodeVarintStructs(dAtA, i, uint64(m.Permissions))
  197. }
  198. if m.ModifiedS != 0 {
  199. dAtA[i] = 0x28
  200. i++
  201. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedS))
  202. }
  203. if m.Deleted {
  204. dAtA[i] = 0x30
  205. i++
  206. if m.Deleted {
  207. dAtA[i] = 1
  208. } else {
  209. dAtA[i] = 0
  210. }
  211. i++
  212. }
  213. if m.Invalid {
  214. dAtA[i] = 0x38
  215. i++
  216. if m.Invalid {
  217. dAtA[i] = 1
  218. } else {
  219. dAtA[i] = 0
  220. }
  221. i++
  222. }
  223. if m.NoPermissions {
  224. dAtA[i] = 0x40
  225. i++
  226. if m.NoPermissions {
  227. dAtA[i] = 1
  228. } else {
  229. dAtA[i] = 0
  230. }
  231. i++
  232. }
  233. dAtA[i] = 0x4a
  234. i++
  235. i = encodeVarintStructs(dAtA, i, uint64(m.Version.ProtoSize()))
  236. n2, err := m.Version.MarshalTo(dAtA[i:])
  237. if err != nil {
  238. return 0, err
  239. }
  240. i += n2
  241. if m.Sequence != 0 {
  242. dAtA[i] = 0x50
  243. i++
  244. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  245. }
  246. if m.ModifiedNs != 0 {
  247. dAtA[i] = 0x58
  248. i++
  249. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedNs))
  250. }
  251. if m.ModifiedBy != 0 {
  252. dAtA[i] = 0x60
  253. i++
  254. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedBy))
  255. }
  256. if len(m.SymlinkTarget) > 0 {
  257. dAtA[i] = 0x8a
  258. i++
  259. dAtA[i] = 0x1
  260. i++
  261. i = encodeVarintStructs(dAtA, i, uint64(len(m.SymlinkTarget)))
  262. i += copy(dAtA[i:], m.SymlinkTarget)
  263. }
  264. return i, nil
  265. }
  266. func (m *Counts) Marshal() (dAtA []byte, err error) {
  267. size := m.ProtoSize()
  268. dAtA = make([]byte, size)
  269. n, err := m.MarshalTo(dAtA)
  270. if err != nil {
  271. return nil, err
  272. }
  273. return dAtA[:n], nil
  274. }
  275. func (m *Counts) MarshalTo(dAtA []byte) (int, error) {
  276. var i int
  277. _ = i
  278. var l int
  279. _ = l
  280. if m.Files != 0 {
  281. dAtA[i] = 0x8
  282. i++
  283. i = encodeVarintStructs(dAtA, i, uint64(m.Files))
  284. }
  285. if m.Directories != 0 {
  286. dAtA[i] = 0x10
  287. i++
  288. i = encodeVarintStructs(dAtA, i, uint64(m.Directories))
  289. }
  290. if m.Symlinks != 0 {
  291. dAtA[i] = 0x18
  292. i++
  293. i = encodeVarintStructs(dAtA, i, uint64(m.Symlinks))
  294. }
  295. if m.Deleted != 0 {
  296. dAtA[i] = 0x20
  297. i++
  298. i = encodeVarintStructs(dAtA, i, uint64(m.Deleted))
  299. }
  300. if m.Bytes != 0 {
  301. dAtA[i] = 0x28
  302. i++
  303. i = encodeVarintStructs(dAtA, i, uint64(m.Bytes))
  304. }
  305. if m.Sequence != 0 {
  306. dAtA[i] = 0x30
  307. i++
  308. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  309. }
  310. if len(m.DeviceID) > 0 {
  311. dAtA[i] = 0x8a
  312. i++
  313. dAtA[i] = 0x1
  314. i++
  315. i = encodeVarintStructs(dAtA, i, uint64(len(m.DeviceID)))
  316. i += copy(dAtA[i:], m.DeviceID)
  317. }
  318. return i, nil
  319. }
  320. func (m *CountsSet) Marshal() (dAtA []byte, err error) {
  321. size := m.ProtoSize()
  322. dAtA = make([]byte, size)
  323. n, err := m.MarshalTo(dAtA)
  324. if err != nil {
  325. return nil, err
  326. }
  327. return dAtA[:n], nil
  328. }
  329. func (m *CountsSet) MarshalTo(dAtA []byte) (int, error) {
  330. var i int
  331. _ = i
  332. var l int
  333. _ = l
  334. if len(m.Counts) > 0 {
  335. for _, msg := range m.Counts {
  336. dAtA[i] = 0xa
  337. i++
  338. i = encodeVarintStructs(dAtA, i, uint64(msg.ProtoSize()))
  339. n, err := msg.MarshalTo(dAtA[i:])
  340. if err != nil {
  341. return 0, err
  342. }
  343. i += n
  344. }
  345. }
  346. if m.Created != 0 {
  347. dAtA[i] = 0x10
  348. i++
  349. i = encodeVarintStructs(dAtA, i, uint64(m.Created))
  350. }
  351. return i, nil
  352. }
  353. func encodeFixed64Structs(dAtA []byte, offset int, v uint64) int {
  354. dAtA[offset] = uint8(v)
  355. dAtA[offset+1] = uint8(v >> 8)
  356. dAtA[offset+2] = uint8(v >> 16)
  357. dAtA[offset+3] = uint8(v >> 24)
  358. dAtA[offset+4] = uint8(v >> 32)
  359. dAtA[offset+5] = uint8(v >> 40)
  360. dAtA[offset+6] = uint8(v >> 48)
  361. dAtA[offset+7] = uint8(v >> 56)
  362. return offset + 8
  363. }
  364. func encodeFixed32Structs(dAtA []byte, offset int, v uint32) int {
  365. dAtA[offset] = uint8(v)
  366. dAtA[offset+1] = uint8(v >> 8)
  367. dAtA[offset+2] = uint8(v >> 16)
  368. dAtA[offset+3] = uint8(v >> 24)
  369. return offset + 4
  370. }
  371. func encodeVarintStructs(dAtA []byte, offset int, v uint64) int {
  372. for v >= 1<<7 {
  373. dAtA[offset] = uint8(v&0x7f | 0x80)
  374. v >>= 7
  375. offset++
  376. }
  377. dAtA[offset] = uint8(v)
  378. return offset + 1
  379. }
  380. func (m *FileVersion) ProtoSize() (n int) {
  381. var l int
  382. _ = l
  383. l = m.Version.ProtoSize()
  384. n += 1 + l + sovStructs(uint64(l))
  385. l = len(m.Device)
  386. if l > 0 {
  387. n += 1 + l + sovStructs(uint64(l))
  388. }
  389. if m.Invalid {
  390. n += 2
  391. }
  392. return n
  393. }
  394. func (m *VersionList) ProtoSize() (n int) {
  395. var l int
  396. _ = l
  397. if len(m.Versions) > 0 {
  398. for _, e := range m.Versions {
  399. l = e.ProtoSize()
  400. n += 1 + l + sovStructs(uint64(l))
  401. }
  402. }
  403. return n
  404. }
  405. func (m *FileInfoTruncated) ProtoSize() (n int) {
  406. var l int
  407. _ = l
  408. l = len(m.Name)
  409. if l > 0 {
  410. n += 1 + l + sovStructs(uint64(l))
  411. }
  412. if m.Type != 0 {
  413. n += 1 + sovStructs(uint64(m.Type))
  414. }
  415. if m.Size != 0 {
  416. n += 1 + sovStructs(uint64(m.Size))
  417. }
  418. if m.Permissions != 0 {
  419. n += 1 + sovStructs(uint64(m.Permissions))
  420. }
  421. if m.ModifiedS != 0 {
  422. n += 1 + sovStructs(uint64(m.ModifiedS))
  423. }
  424. if m.Deleted {
  425. n += 2
  426. }
  427. if m.Invalid {
  428. n += 2
  429. }
  430. if m.NoPermissions {
  431. n += 2
  432. }
  433. l = m.Version.ProtoSize()
  434. n += 1 + l + sovStructs(uint64(l))
  435. if m.Sequence != 0 {
  436. n += 1 + sovStructs(uint64(m.Sequence))
  437. }
  438. if m.ModifiedNs != 0 {
  439. n += 1 + sovStructs(uint64(m.ModifiedNs))
  440. }
  441. if m.ModifiedBy != 0 {
  442. n += 1 + sovStructs(uint64(m.ModifiedBy))
  443. }
  444. l = len(m.SymlinkTarget)
  445. if l > 0 {
  446. n += 2 + l + sovStructs(uint64(l))
  447. }
  448. return n
  449. }
  450. func (m *Counts) ProtoSize() (n int) {
  451. var l int
  452. _ = l
  453. if m.Files != 0 {
  454. n += 1 + sovStructs(uint64(m.Files))
  455. }
  456. if m.Directories != 0 {
  457. n += 1 + sovStructs(uint64(m.Directories))
  458. }
  459. if m.Symlinks != 0 {
  460. n += 1 + sovStructs(uint64(m.Symlinks))
  461. }
  462. if m.Deleted != 0 {
  463. n += 1 + sovStructs(uint64(m.Deleted))
  464. }
  465. if m.Bytes != 0 {
  466. n += 1 + sovStructs(uint64(m.Bytes))
  467. }
  468. if m.Sequence != 0 {
  469. n += 1 + sovStructs(uint64(m.Sequence))
  470. }
  471. l = len(m.DeviceID)
  472. if l > 0 {
  473. n += 2 + l + sovStructs(uint64(l))
  474. }
  475. return n
  476. }
  477. func (m *CountsSet) ProtoSize() (n int) {
  478. var l int
  479. _ = l
  480. if len(m.Counts) > 0 {
  481. for _, e := range m.Counts {
  482. l = e.ProtoSize()
  483. n += 1 + l + sovStructs(uint64(l))
  484. }
  485. }
  486. if m.Created != 0 {
  487. n += 1 + sovStructs(uint64(m.Created))
  488. }
  489. return n
  490. }
  491. func sovStructs(x uint64) (n int) {
  492. for {
  493. n++
  494. x >>= 7
  495. if x == 0 {
  496. break
  497. }
  498. }
  499. return n
  500. }
  501. func sozStructs(x uint64) (n int) {
  502. return sovStructs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  503. }
  504. func (m *FileVersion) Unmarshal(dAtA []byte) error {
  505. l := len(dAtA)
  506. iNdEx := 0
  507. for iNdEx < l {
  508. preIndex := iNdEx
  509. var wire uint64
  510. for shift := uint(0); ; shift += 7 {
  511. if shift >= 64 {
  512. return ErrIntOverflowStructs
  513. }
  514. if iNdEx >= l {
  515. return io.ErrUnexpectedEOF
  516. }
  517. b := dAtA[iNdEx]
  518. iNdEx++
  519. wire |= (uint64(b) & 0x7F) << shift
  520. if b < 0x80 {
  521. break
  522. }
  523. }
  524. fieldNum := int32(wire >> 3)
  525. wireType := int(wire & 0x7)
  526. if wireType == 4 {
  527. return fmt.Errorf("proto: FileVersion: wiretype end group for non-group")
  528. }
  529. if fieldNum <= 0 {
  530. return fmt.Errorf("proto: FileVersion: illegal tag %d (wire type %d)", fieldNum, wire)
  531. }
  532. switch fieldNum {
  533. case 1:
  534. if wireType != 2 {
  535. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  536. }
  537. var msglen int
  538. for shift := uint(0); ; shift += 7 {
  539. if shift >= 64 {
  540. return ErrIntOverflowStructs
  541. }
  542. if iNdEx >= l {
  543. return io.ErrUnexpectedEOF
  544. }
  545. b := dAtA[iNdEx]
  546. iNdEx++
  547. msglen |= (int(b) & 0x7F) << shift
  548. if b < 0x80 {
  549. break
  550. }
  551. }
  552. if msglen < 0 {
  553. return ErrInvalidLengthStructs
  554. }
  555. postIndex := iNdEx + msglen
  556. if postIndex > l {
  557. return io.ErrUnexpectedEOF
  558. }
  559. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  560. return err
  561. }
  562. iNdEx = postIndex
  563. case 2:
  564. if wireType != 2 {
  565. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  566. }
  567. var byteLen int
  568. for shift := uint(0); ; shift += 7 {
  569. if shift >= 64 {
  570. return ErrIntOverflowStructs
  571. }
  572. if iNdEx >= l {
  573. return io.ErrUnexpectedEOF
  574. }
  575. b := dAtA[iNdEx]
  576. iNdEx++
  577. byteLen |= (int(b) & 0x7F) << shift
  578. if b < 0x80 {
  579. break
  580. }
  581. }
  582. if byteLen < 0 {
  583. return ErrInvalidLengthStructs
  584. }
  585. postIndex := iNdEx + byteLen
  586. if postIndex > l {
  587. return io.ErrUnexpectedEOF
  588. }
  589. m.Device = append(m.Device[:0], dAtA[iNdEx:postIndex]...)
  590. if m.Device == nil {
  591. m.Device = []byte{}
  592. }
  593. iNdEx = postIndex
  594. case 3:
  595. if wireType != 0 {
  596. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  597. }
  598. var v int
  599. for shift := uint(0); ; shift += 7 {
  600. if shift >= 64 {
  601. return ErrIntOverflowStructs
  602. }
  603. if iNdEx >= l {
  604. return io.ErrUnexpectedEOF
  605. }
  606. b := dAtA[iNdEx]
  607. iNdEx++
  608. v |= (int(b) & 0x7F) << shift
  609. if b < 0x80 {
  610. break
  611. }
  612. }
  613. m.Invalid = bool(v != 0)
  614. default:
  615. iNdEx = preIndex
  616. skippy, err := skipStructs(dAtA[iNdEx:])
  617. if err != nil {
  618. return err
  619. }
  620. if skippy < 0 {
  621. return ErrInvalidLengthStructs
  622. }
  623. if (iNdEx + skippy) > l {
  624. return io.ErrUnexpectedEOF
  625. }
  626. iNdEx += skippy
  627. }
  628. }
  629. if iNdEx > l {
  630. return io.ErrUnexpectedEOF
  631. }
  632. return nil
  633. }
  634. func (m *VersionList) Unmarshal(dAtA []byte) error {
  635. l := len(dAtA)
  636. iNdEx := 0
  637. for iNdEx < l {
  638. preIndex := iNdEx
  639. var wire uint64
  640. for shift := uint(0); ; shift += 7 {
  641. if shift >= 64 {
  642. return ErrIntOverflowStructs
  643. }
  644. if iNdEx >= l {
  645. return io.ErrUnexpectedEOF
  646. }
  647. b := dAtA[iNdEx]
  648. iNdEx++
  649. wire |= (uint64(b) & 0x7F) << shift
  650. if b < 0x80 {
  651. break
  652. }
  653. }
  654. fieldNum := int32(wire >> 3)
  655. wireType := int(wire & 0x7)
  656. if wireType == 4 {
  657. return fmt.Errorf("proto: VersionList: wiretype end group for non-group")
  658. }
  659. if fieldNum <= 0 {
  660. return fmt.Errorf("proto: VersionList: illegal tag %d (wire type %d)", fieldNum, wire)
  661. }
  662. switch fieldNum {
  663. case 1:
  664. if wireType != 2 {
  665. return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
  666. }
  667. var msglen int
  668. for shift := uint(0); ; shift += 7 {
  669. if shift >= 64 {
  670. return ErrIntOverflowStructs
  671. }
  672. if iNdEx >= l {
  673. return io.ErrUnexpectedEOF
  674. }
  675. b := dAtA[iNdEx]
  676. iNdEx++
  677. msglen |= (int(b) & 0x7F) << shift
  678. if b < 0x80 {
  679. break
  680. }
  681. }
  682. if msglen < 0 {
  683. return ErrInvalidLengthStructs
  684. }
  685. postIndex := iNdEx + msglen
  686. if postIndex > l {
  687. return io.ErrUnexpectedEOF
  688. }
  689. m.Versions = append(m.Versions, FileVersion{})
  690. if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  691. return err
  692. }
  693. iNdEx = postIndex
  694. default:
  695. iNdEx = preIndex
  696. skippy, err := skipStructs(dAtA[iNdEx:])
  697. if err != nil {
  698. return err
  699. }
  700. if skippy < 0 {
  701. return ErrInvalidLengthStructs
  702. }
  703. if (iNdEx + skippy) > l {
  704. return io.ErrUnexpectedEOF
  705. }
  706. iNdEx += skippy
  707. }
  708. }
  709. if iNdEx > l {
  710. return io.ErrUnexpectedEOF
  711. }
  712. return nil
  713. }
  714. func (m *FileInfoTruncated) Unmarshal(dAtA []byte) error {
  715. l := len(dAtA)
  716. iNdEx := 0
  717. for iNdEx < l {
  718. preIndex := iNdEx
  719. var wire uint64
  720. for shift := uint(0); ; shift += 7 {
  721. if shift >= 64 {
  722. return ErrIntOverflowStructs
  723. }
  724. if iNdEx >= l {
  725. return io.ErrUnexpectedEOF
  726. }
  727. b := dAtA[iNdEx]
  728. iNdEx++
  729. wire |= (uint64(b) & 0x7F) << shift
  730. if b < 0x80 {
  731. break
  732. }
  733. }
  734. fieldNum := int32(wire >> 3)
  735. wireType := int(wire & 0x7)
  736. if wireType == 4 {
  737. return fmt.Errorf("proto: FileInfoTruncated: wiretype end group for non-group")
  738. }
  739. if fieldNum <= 0 {
  740. return fmt.Errorf("proto: FileInfoTruncated: illegal tag %d (wire type %d)", fieldNum, wire)
  741. }
  742. switch fieldNum {
  743. case 1:
  744. if wireType != 2 {
  745. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  746. }
  747. var stringLen uint64
  748. for shift := uint(0); ; shift += 7 {
  749. if shift >= 64 {
  750. return ErrIntOverflowStructs
  751. }
  752. if iNdEx >= l {
  753. return io.ErrUnexpectedEOF
  754. }
  755. b := dAtA[iNdEx]
  756. iNdEx++
  757. stringLen |= (uint64(b) & 0x7F) << shift
  758. if b < 0x80 {
  759. break
  760. }
  761. }
  762. intStringLen := int(stringLen)
  763. if intStringLen < 0 {
  764. return ErrInvalidLengthStructs
  765. }
  766. postIndex := iNdEx + intStringLen
  767. if postIndex > l {
  768. return io.ErrUnexpectedEOF
  769. }
  770. m.Name = string(dAtA[iNdEx:postIndex])
  771. iNdEx = postIndex
  772. case 2:
  773. if wireType != 0 {
  774. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  775. }
  776. m.Type = 0
  777. for shift := uint(0); ; shift += 7 {
  778. if shift >= 64 {
  779. return ErrIntOverflowStructs
  780. }
  781. if iNdEx >= l {
  782. return io.ErrUnexpectedEOF
  783. }
  784. b := dAtA[iNdEx]
  785. iNdEx++
  786. m.Type |= (protocol.FileInfoType(b) & 0x7F) << shift
  787. if b < 0x80 {
  788. break
  789. }
  790. }
  791. case 3:
  792. if wireType != 0 {
  793. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  794. }
  795. m.Size = 0
  796. for shift := uint(0); ; shift += 7 {
  797. if shift >= 64 {
  798. return ErrIntOverflowStructs
  799. }
  800. if iNdEx >= l {
  801. return io.ErrUnexpectedEOF
  802. }
  803. b := dAtA[iNdEx]
  804. iNdEx++
  805. m.Size |= (int64(b) & 0x7F) << shift
  806. if b < 0x80 {
  807. break
  808. }
  809. }
  810. case 4:
  811. if wireType != 0 {
  812. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  813. }
  814. m.Permissions = 0
  815. for shift := uint(0); ; shift += 7 {
  816. if shift >= 64 {
  817. return ErrIntOverflowStructs
  818. }
  819. if iNdEx >= l {
  820. return io.ErrUnexpectedEOF
  821. }
  822. b := dAtA[iNdEx]
  823. iNdEx++
  824. m.Permissions |= (uint32(b) & 0x7F) << shift
  825. if b < 0x80 {
  826. break
  827. }
  828. }
  829. case 5:
  830. if wireType != 0 {
  831. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  832. }
  833. m.ModifiedS = 0
  834. for shift := uint(0); ; shift += 7 {
  835. if shift >= 64 {
  836. return ErrIntOverflowStructs
  837. }
  838. if iNdEx >= l {
  839. return io.ErrUnexpectedEOF
  840. }
  841. b := dAtA[iNdEx]
  842. iNdEx++
  843. m.ModifiedS |= (int64(b) & 0x7F) << shift
  844. if b < 0x80 {
  845. break
  846. }
  847. }
  848. case 6:
  849. if wireType != 0 {
  850. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  851. }
  852. var v int
  853. for shift := uint(0); ; shift += 7 {
  854. if shift >= 64 {
  855. return ErrIntOverflowStructs
  856. }
  857. if iNdEx >= l {
  858. return io.ErrUnexpectedEOF
  859. }
  860. b := dAtA[iNdEx]
  861. iNdEx++
  862. v |= (int(b) & 0x7F) << shift
  863. if b < 0x80 {
  864. break
  865. }
  866. }
  867. m.Deleted = bool(v != 0)
  868. case 7:
  869. if wireType != 0 {
  870. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  871. }
  872. var v int
  873. for shift := uint(0); ; shift += 7 {
  874. if shift >= 64 {
  875. return ErrIntOverflowStructs
  876. }
  877. if iNdEx >= l {
  878. return io.ErrUnexpectedEOF
  879. }
  880. b := dAtA[iNdEx]
  881. iNdEx++
  882. v |= (int(b) & 0x7F) << shift
  883. if b < 0x80 {
  884. break
  885. }
  886. }
  887. m.Invalid = bool(v != 0)
  888. case 8:
  889. if wireType != 0 {
  890. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  891. }
  892. var v int
  893. for shift := uint(0); ; shift += 7 {
  894. if shift >= 64 {
  895. return ErrIntOverflowStructs
  896. }
  897. if iNdEx >= l {
  898. return io.ErrUnexpectedEOF
  899. }
  900. b := dAtA[iNdEx]
  901. iNdEx++
  902. v |= (int(b) & 0x7F) << shift
  903. if b < 0x80 {
  904. break
  905. }
  906. }
  907. m.NoPermissions = bool(v != 0)
  908. case 9:
  909. if wireType != 2 {
  910. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  911. }
  912. var msglen int
  913. for shift := uint(0); ; shift += 7 {
  914. if shift >= 64 {
  915. return ErrIntOverflowStructs
  916. }
  917. if iNdEx >= l {
  918. return io.ErrUnexpectedEOF
  919. }
  920. b := dAtA[iNdEx]
  921. iNdEx++
  922. msglen |= (int(b) & 0x7F) << shift
  923. if b < 0x80 {
  924. break
  925. }
  926. }
  927. if msglen < 0 {
  928. return ErrInvalidLengthStructs
  929. }
  930. postIndex := iNdEx + msglen
  931. if postIndex > l {
  932. return io.ErrUnexpectedEOF
  933. }
  934. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  935. return err
  936. }
  937. iNdEx = postIndex
  938. case 10:
  939. if wireType != 0 {
  940. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  941. }
  942. m.Sequence = 0
  943. for shift := uint(0); ; shift += 7 {
  944. if shift >= 64 {
  945. return ErrIntOverflowStructs
  946. }
  947. if iNdEx >= l {
  948. return io.ErrUnexpectedEOF
  949. }
  950. b := dAtA[iNdEx]
  951. iNdEx++
  952. m.Sequence |= (int64(b) & 0x7F) << shift
  953. if b < 0x80 {
  954. break
  955. }
  956. }
  957. case 11:
  958. if wireType != 0 {
  959. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  960. }
  961. m.ModifiedNs = 0
  962. for shift := uint(0); ; shift += 7 {
  963. if shift >= 64 {
  964. return ErrIntOverflowStructs
  965. }
  966. if iNdEx >= l {
  967. return io.ErrUnexpectedEOF
  968. }
  969. b := dAtA[iNdEx]
  970. iNdEx++
  971. m.ModifiedNs |= (int32(b) & 0x7F) << shift
  972. if b < 0x80 {
  973. break
  974. }
  975. }
  976. case 12:
  977. if wireType != 0 {
  978. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  979. }
  980. m.ModifiedBy = 0
  981. for shift := uint(0); ; shift += 7 {
  982. if shift >= 64 {
  983. return ErrIntOverflowStructs
  984. }
  985. if iNdEx >= l {
  986. return io.ErrUnexpectedEOF
  987. }
  988. b := dAtA[iNdEx]
  989. iNdEx++
  990. m.ModifiedBy |= (github_com_syncthing_syncthing_lib_protocol.ShortID(b) & 0x7F) << shift
  991. if b < 0x80 {
  992. break
  993. }
  994. }
  995. case 17:
  996. if wireType != 2 {
  997. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  998. }
  999. var stringLen uint64
  1000. for shift := uint(0); ; shift += 7 {
  1001. if shift >= 64 {
  1002. return ErrIntOverflowStructs
  1003. }
  1004. if iNdEx >= l {
  1005. return io.ErrUnexpectedEOF
  1006. }
  1007. b := dAtA[iNdEx]
  1008. iNdEx++
  1009. stringLen |= (uint64(b) & 0x7F) << shift
  1010. if b < 0x80 {
  1011. break
  1012. }
  1013. }
  1014. intStringLen := int(stringLen)
  1015. if intStringLen < 0 {
  1016. return ErrInvalidLengthStructs
  1017. }
  1018. postIndex := iNdEx + intStringLen
  1019. if postIndex > l {
  1020. return io.ErrUnexpectedEOF
  1021. }
  1022. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  1023. iNdEx = postIndex
  1024. default:
  1025. iNdEx = preIndex
  1026. skippy, err := skipStructs(dAtA[iNdEx:])
  1027. if err != nil {
  1028. return err
  1029. }
  1030. if skippy < 0 {
  1031. return ErrInvalidLengthStructs
  1032. }
  1033. if (iNdEx + skippy) > l {
  1034. return io.ErrUnexpectedEOF
  1035. }
  1036. iNdEx += skippy
  1037. }
  1038. }
  1039. if iNdEx > l {
  1040. return io.ErrUnexpectedEOF
  1041. }
  1042. return nil
  1043. }
  1044. func (m *Counts) Unmarshal(dAtA []byte) error {
  1045. l := len(dAtA)
  1046. iNdEx := 0
  1047. for iNdEx < l {
  1048. preIndex := iNdEx
  1049. var wire uint64
  1050. for shift := uint(0); ; shift += 7 {
  1051. if shift >= 64 {
  1052. return ErrIntOverflowStructs
  1053. }
  1054. if iNdEx >= l {
  1055. return io.ErrUnexpectedEOF
  1056. }
  1057. b := dAtA[iNdEx]
  1058. iNdEx++
  1059. wire |= (uint64(b) & 0x7F) << shift
  1060. if b < 0x80 {
  1061. break
  1062. }
  1063. }
  1064. fieldNum := int32(wire >> 3)
  1065. wireType := int(wire & 0x7)
  1066. if wireType == 4 {
  1067. return fmt.Errorf("proto: Counts: wiretype end group for non-group")
  1068. }
  1069. if fieldNum <= 0 {
  1070. return fmt.Errorf("proto: Counts: illegal tag %d (wire type %d)", fieldNum, wire)
  1071. }
  1072. switch fieldNum {
  1073. case 1:
  1074. if wireType != 0 {
  1075. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  1076. }
  1077. m.Files = 0
  1078. for shift := uint(0); ; shift += 7 {
  1079. if shift >= 64 {
  1080. return ErrIntOverflowStructs
  1081. }
  1082. if iNdEx >= l {
  1083. return io.ErrUnexpectedEOF
  1084. }
  1085. b := dAtA[iNdEx]
  1086. iNdEx++
  1087. m.Files |= (int32(b) & 0x7F) << shift
  1088. if b < 0x80 {
  1089. break
  1090. }
  1091. }
  1092. case 2:
  1093. if wireType != 0 {
  1094. return fmt.Errorf("proto: wrong wireType = %d for field Directories", wireType)
  1095. }
  1096. m.Directories = 0
  1097. for shift := uint(0); ; shift += 7 {
  1098. if shift >= 64 {
  1099. return ErrIntOverflowStructs
  1100. }
  1101. if iNdEx >= l {
  1102. return io.ErrUnexpectedEOF
  1103. }
  1104. b := dAtA[iNdEx]
  1105. iNdEx++
  1106. m.Directories |= (int32(b) & 0x7F) << shift
  1107. if b < 0x80 {
  1108. break
  1109. }
  1110. }
  1111. case 3:
  1112. if wireType != 0 {
  1113. return fmt.Errorf("proto: wrong wireType = %d for field Symlinks", wireType)
  1114. }
  1115. m.Symlinks = 0
  1116. for shift := uint(0); ; shift += 7 {
  1117. if shift >= 64 {
  1118. return ErrIntOverflowStructs
  1119. }
  1120. if iNdEx >= l {
  1121. return io.ErrUnexpectedEOF
  1122. }
  1123. b := dAtA[iNdEx]
  1124. iNdEx++
  1125. m.Symlinks |= (int32(b) & 0x7F) << shift
  1126. if b < 0x80 {
  1127. break
  1128. }
  1129. }
  1130. case 4:
  1131. if wireType != 0 {
  1132. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1133. }
  1134. m.Deleted = 0
  1135. for shift := uint(0); ; shift += 7 {
  1136. if shift >= 64 {
  1137. return ErrIntOverflowStructs
  1138. }
  1139. if iNdEx >= l {
  1140. return io.ErrUnexpectedEOF
  1141. }
  1142. b := dAtA[iNdEx]
  1143. iNdEx++
  1144. m.Deleted |= (int32(b) & 0x7F) << shift
  1145. if b < 0x80 {
  1146. break
  1147. }
  1148. }
  1149. case 5:
  1150. if wireType != 0 {
  1151. return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
  1152. }
  1153. m.Bytes = 0
  1154. for shift := uint(0); ; shift += 7 {
  1155. if shift >= 64 {
  1156. return ErrIntOverflowStructs
  1157. }
  1158. if iNdEx >= l {
  1159. return io.ErrUnexpectedEOF
  1160. }
  1161. b := dAtA[iNdEx]
  1162. iNdEx++
  1163. m.Bytes |= (int64(b) & 0x7F) << shift
  1164. if b < 0x80 {
  1165. break
  1166. }
  1167. }
  1168. case 6:
  1169. if wireType != 0 {
  1170. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  1171. }
  1172. m.Sequence = 0
  1173. for shift := uint(0); ; shift += 7 {
  1174. if shift >= 64 {
  1175. return ErrIntOverflowStructs
  1176. }
  1177. if iNdEx >= l {
  1178. return io.ErrUnexpectedEOF
  1179. }
  1180. b := dAtA[iNdEx]
  1181. iNdEx++
  1182. m.Sequence |= (int64(b) & 0x7F) << shift
  1183. if b < 0x80 {
  1184. break
  1185. }
  1186. }
  1187. case 17:
  1188. if wireType != 2 {
  1189. return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
  1190. }
  1191. var byteLen int
  1192. for shift := uint(0); ; shift += 7 {
  1193. if shift >= 64 {
  1194. return ErrIntOverflowStructs
  1195. }
  1196. if iNdEx >= l {
  1197. return io.ErrUnexpectedEOF
  1198. }
  1199. b := dAtA[iNdEx]
  1200. iNdEx++
  1201. byteLen |= (int(b) & 0x7F) << shift
  1202. if b < 0x80 {
  1203. break
  1204. }
  1205. }
  1206. if byteLen < 0 {
  1207. return ErrInvalidLengthStructs
  1208. }
  1209. postIndex := iNdEx + byteLen
  1210. if postIndex > l {
  1211. return io.ErrUnexpectedEOF
  1212. }
  1213. m.DeviceID = append(m.DeviceID[:0], dAtA[iNdEx:postIndex]...)
  1214. if m.DeviceID == nil {
  1215. m.DeviceID = []byte{}
  1216. }
  1217. iNdEx = postIndex
  1218. default:
  1219. iNdEx = preIndex
  1220. skippy, err := skipStructs(dAtA[iNdEx:])
  1221. if err != nil {
  1222. return err
  1223. }
  1224. if skippy < 0 {
  1225. return ErrInvalidLengthStructs
  1226. }
  1227. if (iNdEx + skippy) > l {
  1228. return io.ErrUnexpectedEOF
  1229. }
  1230. iNdEx += skippy
  1231. }
  1232. }
  1233. if iNdEx > l {
  1234. return io.ErrUnexpectedEOF
  1235. }
  1236. return nil
  1237. }
  1238. func (m *CountsSet) Unmarshal(dAtA []byte) error {
  1239. l := len(dAtA)
  1240. iNdEx := 0
  1241. for iNdEx < l {
  1242. preIndex := iNdEx
  1243. var wire uint64
  1244. for shift := uint(0); ; shift += 7 {
  1245. if shift >= 64 {
  1246. return ErrIntOverflowStructs
  1247. }
  1248. if iNdEx >= l {
  1249. return io.ErrUnexpectedEOF
  1250. }
  1251. b := dAtA[iNdEx]
  1252. iNdEx++
  1253. wire |= (uint64(b) & 0x7F) << shift
  1254. if b < 0x80 {
  1255. break
  1256. }
  1257. }
  1258. fieldNum := int32(wire >> 3)
  1259. wireType := int(wire & 0x7)
  1260. if wireType == 4 {
  1261. return fmt.Errorf("proto: CountsSet: wiretype end group for non-group")
  1262. }
  1263. if fieldNum <= 0 {
  1264. return fmt.Errorf("proto: CountsSet: illegal tag %d (wire type %d)", fieldNum, wire)
  1265. }
  1266. switch fieldNum {
  1267. case 1:
  1268. if wireType != 2 {
  1269. return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType)
  1270. }
  1271. var msglen int
  1272. for shift := uint(0); ; shift += 7 {
  1273. if shift >= 64 {
  1274. return ErrIntOverflowStructs
  1275. }
  1276. if iNdEx >= l {
  1277. return io.ErrUnexpectedEOF
  1278. }
  1279. b := dAtA[iNdEx]
  1280. iNdEx++
  1281. msglen |= (int(b) & 0x7F) << shift
  1282. if b < 0x80 {
  1283. break
  1284. }
  1285. }
  1286. if msglen < 0 {
  1287. return ErrInvalidLengthStructs
  1288. }
  1289. postIndex := iNdEx + msglen
  1290. if postIndex > l {
  1291. return io.ErrUnexpectedEOF
  1292. }
  1293. m.Counts = append(m.Counts, Counts{})
  1294. if err := m.Counts[len(m.Counts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1295. return err
  1296. }
  1297. iNdEx = postIndex
  1298. case 2:
  1299. if wireType != 0 {
  1300. return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
  1301. }
  1302. m.Created = 0
  1303. for shift := uint(0); ; shift += 7 {
  1304. if shift >= 64 {
  1305. return ErrIntOverflowStructs
  1306. }
  1307. if iNdEx >= l {
  1308. return io.ErrUnexpectedEOF
  1309. }
  1310. b := dAtA[iNdEx]
  1311. iNdEx++
  1312. m.Created |= (int64(b) & 0x7F) << shift
  1313. if b < 0x80 {
  1314. break
  1315. }
  1316. }
  1317. default:
  1318. iNdEx = preIndex
  1319. skippy, err := skipStructs(dAtA[iNdEx:])
  1320. if err != nil {
  1321. return err
  1322. }
  1323. if skippy < 0 {
  1324. return ErrInvalidLengthStructs
  1325. }
  1326. if (iNdEx + skippy) > l {
  1327. return io.ErrUnexpectedEOF
  1328. }
  1329. iNdEx += skippy
  1330. }
  1331. }
  1332. if iNdEx > l {
  1333. return io.ErrUnexpectedEOF
  1334. }
  1335. return nil
  1336. }
  1337. func skipStructs(dAtA []byte) (n int, err error) {
  1338. l := len(dAtA)
  1339. iNdEx := 0
  1340. for iNdEx < l {
  1341. var wire uint64
  1342. for shift := uint(0); ; shift += 7 {
  1343. if shift >= 64 {
  1344. return 0, ErrIntOverflowStructs
  1345. }
  1346. if iNdEx >= l {
  1347. return 0, io.ErrUnexpectedEOF
  1348. }
  1349. b := dAtA[iNdEx]
  1350. iNdEx++
  1351. wire |= (uint64(b) & 0x7F) << shift
  1352. if b < 0x80 {
  1353. break
  1354. }
  1355. }
  1356. wireType := int(wire & 0x7)
  1357. switch wireType {
  1358. case 0:
  1359. for shift := uint(0); ; shift += 7 {
  1360. if shift >= 64 {
  1361. return 0, ErrIntOverflowStructs
  1362. }
  1363. if iNdEx >= l {
  1364. return 0, io.ErrUnexpectedEOF
  1365. }
  1366. iNdEx++
  1367. if dAtA[iNdEx-1] < 0x80 {
  1368. break
  1369. }
  1370. }
  1371. return iNdEx, nil
  1372. case 1:
  1373. iNdEx += 8
  1374. return iNdEx, nil
  1375. case 2:
  1376. var length int
  1377. for shift := uint(0); ; shift += 7 {
  1378. if shift >= 64 {
  1379. return 0, ErrIntOverflowStructs
  1380. }
  1381. if iNdEx >= l {
  1382. return 0, io.ErrUnexpectedEOF
  1383. }
  1384. b := dAtA[iNdEx]
  1385. iNdEx++
  1386. length |= (int(b) & 0x7F) << shift
  1387. if b < 0x80 {
  1388. break
  1389. }
  1390. }
  1391. iNdEx += length
  1392. if length < 0 {
  1393. return 0, ErrInvalidLengthStructs
  1394. }
  1395. return iNdEx, nil
  1396. case 3:
  1397. for {
  1398. var innerWire uint64
  1399. var start int = iNdEx
  1400. for shift := uint(0); ; shift += 7 {
  1401. if shift >= 64 {
  1402. return 0, ErrIntOverflowStructs
  1403. }
  1404. if iNdEx >= l {
  1405. return 0, io.ErrUnexpectedEOF
  1406. }
  1407. b := dAtA[iNdEx]
  1408. iNdEx++
  1409. innerWire |= (uint64(b) & 0x7F) << shift
  1410. if b < 0x80 {
  1411. break
  1412. }
  1413. }
  1414. innerWireType := int(innerWire & 0x7)
  1415. if innerWireType == 4 {
  1416. break
  1417. }
  1418. next, err := skipStructs(dAtA[start:])
  1419. if err != nil {
  1420. return 0, err
  1421. }
  1422. iNdEx = start + next
  1423. }
  1424. return iNdEx, nil
  1425. case 4:
  1426. return iNdEx, nil
  1427. case 5:
  1428. iNdEx += 4
  1429. return iNdEx, nil
  1430. default:
  1431. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1432. }
  1433. }
  1434. panic("unreachable")
  1435. }
  1436. var (
  1437. ErrInvalidLengthStructs = fmt.Errorf("proto: negative length found during unmarshaling")
  1438. ErrIntOverflowStructs = fmt.Errorf("proto: integer overflow")
  1439. )
  1440. func init() { proto.RegisterFile("structs.proto", fileDescriptorStructs) }
  1441. var fileDescriptorStructs = []byte{
  1442. // 598 bytes of a gzipped FileDescriptorProto
  1443. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcd, 0x6a, 0xdb, 0x4c,
  1444. 0x14, 0xb5, 0x62, 0xc9, 0xb1, 0x47, 0x71, 0xbe, 0x2f, 0x43, 0x08, 0xc2, 0x50, 0x5b, 0x18, 0x0a,
  1445. 0xa2, 0x50, 0xa5, 0x4d, 0xe8, 0xa6, 0xdd, 0xb9, 0x21, 0x10, 0x28, 0x6d, 0x99, 0x84, 0xac, 0x0a,
  1446. 0xc1, 0x92, 0xae, 0x9d, 0xa1, 0xf2, 0x8c, 0xa3, 0x19, 0x07, 0xd4, 0x27, 0xe9, 0x32, 0x0f, 0xd3,
  1447. 0x45, 0x96, 0x5d, 0x77, 0x11, 0x5a, 0xf7, 0x39, 0x0a, 0x45, 0x77, 0x24, 0x45, 0xe9, 0xaa, 0xdd,
  1448. 0xdd, 0x73, 0xff, 0xef, 0x39, 0x33, 0xa4, 0xaf, 0x74, 0xb6, 0x8a, 0xb5, 0x0a, 0x97, 0x99, 0xd4,
  1449. 0x92, 0x6e, 0x24, 0xd1, 0xe0, 0xe9, 0x9c, 0xeb, 0xcb, 0x55, 0x14, 0xc6, 0x72, 0xb1, 0x3f, 0x97,
  1450. 0x73, 0xb9, 0x8f, 0xa1, 0x68, 0x35, 0x43, 0x84, 0x00, 0x2d, 0x53, 0x32, 0x78, 0xd1, 0x48, 0x57,
  1451. 0xb9, 0x88, 0xf5, 0x25, 0x17, 0xf3, 0x86, 0x95, 0xf2, 0xc8, 0x74, 0x88, 0x65, 0xba, 0x1f, 0xc1,
  1452. 0xd2, 0x94, 0x8d, 0xaf, 0x88, 0x7b, 0xcc, 0x53, 0x38, 0x87, 0x4c, 0x71, 0x29, 0xe8, 0x33, 0xb2,
  1453. 0x79, 0x6d, 0x4c, 0xcf, 0xf2, 0xad, 0xc0, 0x3d, 0xf8, 0x3f, 0xac, 0x8a, 0xc2, 0x73, 0x88, 0xb5,
  1454. 0xcc, 0x26, 0xf6, 0xed, 0xdd, 0xa8, 0xc5, 0xaa, 0x34, 0xba, 0x47, 0x3a, 0x09, 0x5c, 0xf3, 0x18,
  1455. 0xbc, 0x0d, 0xdf, 0x0a, 0xb6, 0x58, 0x89, 0xa8, 0x47, 0x36, 0xb9, 0xb8, 0x9e, 0xa6, 0x3c, 0xf1,
  1456. 0xda, 0xbe, 0x15, 0x74, 0x59, 0x05, 0xc7, 0xc7, 0xc4, 0x2d, 0xc7, 0xbd, 0xe1, 0x4a, 0xd3, 0xe7,
  1457. 0xa4, 0x5b, 0xf6, 0x52, 0x9e, 0xe5, 0xb7, 0x03, 0xf7, 0xe0, 0xbf, 0x30, 0x89, 0xc2, 0xc6, 0x56,
  1458. 0xe5, 0xc8, 0x3a, 0xed, 0xa5, 0xfd, 0xf9, 0x66, 0xd4, 0x1a, 0xff, 0x6a, 0x93, 0x9d, 0x22, 0xeb,
  1459. 0x44, 0xcc, 0xe4, 0x59, 0xb6, 0x12, 0xf1, 0x54, 0x43, 0x42, 0x29, 0xb1, 0xc5, 0x74, 0x01, 0xb8,
  1460. 0x7e, 0x8f, 0xa1, 0x4d, 0x9f, 0x10, 0x5b, 0xe7, 0x4b, 0xb3, 0xe1, 0xf6, 0xc1, 0xde, 0xfd, 0x49,
  1461. 0x75, 0x79, 0xbe, 0x04, 0x86, 0x39, 0x45, 0xbd, 0xe2, 0x9f, 0x00, 0x97, 0x6e, 0x33, 0xb4, 0xa9,
  1462. 0x4f, 0xdc, 0x25, 0x64, 0x0b, 0xae, 0xcc, 0x96, 0xb6, 0x6f, 0x05, 0x7d, 0xd6, 0x74, 0xd1, 0x47,
  1463. 0x84, 0x2c, 0x64, 0xc2, 0x67, 0x1c, 0x92, 0x0b, 0xe5, 0x39, 0x58, 0xdb, 0xab, 0x3c, 0xa7, 0x05,
  1464. 0x19, 0x09, 0xa4, 0xa0, 0x21, 0xf1, 0x3a, 0x86, 0x8c, 0x12, 0x36, 0x69, 0xda, 0x7c, 0x40, 0x13,
  1465. 0x7d, 0x4c, 0xb6, 0x85, 0xbc, 0x68, 0xce, 0xed, 0x62, 0x42, 0x5f, 0xc8, 0xf7, 0x8d, 0xc9, 0x0d,
  1466. 0xc5, 0x7a, 0x7f, 0xa7, 0xd8, 0x80, 0x74, 0x15, 0x5c, 0xad, 0x40, 0xc4, 0xe0, 0x11, 0xdc, 0xb4,
  1467. 0xc6, 0x74, 0x44, 0xdc, 0xfa, 0x0e, 0xa1, 0x3c, 0xd7, 0xb7, 0x02, 0x87, 0xd5, 0xa7, 0xbd, 0x55,
  1468. 0xf4, 0x43, 0x23, 0x21, 0xca, 0xbd, 0x2d, 0xdf, 0x0a, 0xec, 0xc9, 0xab, 0x62, 0xc0, 0xb7, 0xbb,
  1469. 0xd1, 0xe1, 0x3f, 0xbc, 0xc1, 0xf0, 0xf4, 0x52, 0x66, 0xfa, 0xe4, 0xe8, 0xbe, 0xfb, 0x24, 0x2f,
  1470. 0x6e, 0x56, 0xf9, 0x22, 0xe5, 0xe2, 0xe3, 0x85, 0x9e, 0x66, 0x73, 0xd0, 0xde, 0x0e, 0xca, 0xd8,
  1471. 0x2f, 0xbd, 0x67, 0xe8, 0x2c, 0xf5, 0xff, 0x62, 0x91, 0xce, 0x6b, 0xb9, 0x12, 0x5a, 0xd1, 0x5d,
  1472. 0xe2, 0xcc, 0x78, 0x0a, 0x0a, 0x55, 0x77, 0x98, 0x01, 0x85, 0x6c, 0x09, 0xcf, 0x90, 0x03, 0x0e,
  1473. 0x0a, 0xd5, 0x77, 0x58, 0xd3, 0x85, 0x54, 0x98, 0xce, 0x0a, 0x05, 0x77, 0x58, 0x8d, 0x9b, 0x9a,
  1474. 0xd9, 0x18, 0xaa, 0x35, 0xdb, 0x25, 0x4e, 0x94, 0x6b, 0xa8, 0x74, 0x36, 0xe0, 0x01, 0xad, 0x9d,
  1475. 0x3f, 0x68, 0x1d, 0x90, 0xae, 0xf9, 0x16, 0x27, 0x47, 0x78, 0xd1, 0x16, 0xab, 0xf1, 0xf8, 0x1d,
  1476. 0xe9, 0x99, 0x2b, 0x4e, 0x41, 0xd3, 0x80, 0x74, 0x62, 0x04, 0xe5, 0x57, 0x20, 0xc5, 0x57, 0x30,
  1477. 0xe1, 0x52, 0xc6, 0x32, 0x5e, 0xac, 0x17, 0x67, 0x50, 0x3c, 0x79, 0x3c, 0xac, 0xcd, 0x2a, 0x38,
  1478. 0xd9, 0xbd, 0xfd, 0x31, 0x6c, 0xdd, 0xae, 0x87, 0xd6, 0xd7, 0xf5, 0xd0, 0xfa, 0xbe, 0x1e, 0xb6,
  1479. 0x6e, 0x7e, 0x0e, 0xad, 0xa8, 0x83, 0xc4, 0x1f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x86,
  1480. 0x97, 0x21, 0x6a, 0x04, 0x00, 0x00,
  1481. }