structs.pb.go 39 KB

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