structs.pb.go 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: structs.proto
  3. package db
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
  9. protocol "github.com/syncthing/syncthing/lib/protocol"
  10. io "io"
  11. math "math"
  12. math_bits "math/bits"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  23. type FileVersion struct {
  24. Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
  25. Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
  26. Devices [][]byte `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"`
  27. InvalidDevices [][]byte `protobuf:"bytes,4,rep,name=invalid_devices,json=invalidDevices,proto3" json:"invalid_devices,omitempty"`
  28. }
  29. func (m *FileVersion) Reset() { *m = FileVersion{} }
  30. func (m *FileVersion) String() string { return proto.CompactTextString(m) }
  31. func (*FileVersion) ProtoMessage() {}
  32. func (*FileVersion) Descriptor() ([]byte, []int) {
  33. return fileDescriptor_e774e8f5f348d14d, []int{0}
  34. }
  35. func (m *FileVersion) XXX_Unmarshal(b []byte) error {
  36. return m.Unmarshal(b)
  37. }
  38. func (m *FileVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  39. if deterministic {
  40. return xxx_messageInfo_FileVersion.Marshal(b, m, deterministic)
  41. } else {
  42. b = b[:cap(b)]
  43. n, err := m.MarshalToSizedBuffer(b)
  44. if err != nil {
  45. return nil, err
  46. }
  47. return b[:n], nil
  48. }
  49. }
  50. func (m *FileVersion) XXX_Merge(src proto.Message) {
  51. xxx_messageInfo_FileVersion.Merge(m, src)
  52. }
  53. func (m *FileVersion) XXX_Size() int {
  54. return m.ProtoSize()
  55. }
  56. func (m *FileVersion) XXX_DiscardUnknown() {
  57. xxx_messageInfo_FileVersion.DiscardUnknown(m)
  58. }
  59. var xxx_messageInfo_FileVersion proto.InternalMessageInfo
  60. type VersionList struct {
  61. RawVersions []FileVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions"`
  62. }
  63. func (m *VersionList) Reset() { *m = VersionList{} }
  64. func (*VersionList) ProtoMessage() {}
  65. func (*VersionList) Descriptor() ([]byte, []int) {
  66. return fileDescriptor_e774e8f5f348d14d, []int{1}
  67. }
  68. func (m *VersionList) XXX_Unmarshal(b []byte) error {
  69. return m.Unmarshal(b)
  70. }
  71. func (m *VersionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  72. if deterministic {
  73. return xxx_messageInfo_VersionList.Marshal(b, m, deterministic)
  74. } else {
  75. b = b[:cap(b)]
  76. n, err := m.MarshalToSizedBuffer(b)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return b[:n], nil
  81. }
  82. }
  83. func (m *VersionList) XXX_Merge(src proto.Message) {
  84. xxx_messageInfo_VersionList.Merge(m, src)
  85. }
  86. func (m *VersionList) XXX_Size() int {
  87. return m.ProtoSize()
  88. }
  89. func (m *VersionList) XXX_DiscardUnknown() {
  90. xxx_messageInfo_VersionList.DiscardUnknown(m)
  91. }
  92. var xxx_messageInfo_VersionList proto.InternalMessageInfo
  93. // Must be the same as FileInfo but without the blocks field
  94. type FileInfoTruncated struct {
  95. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  96. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  97. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
  98. 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"`
  99. Version protocol.Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version"`
  100. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
  101. // repeated BlockInfo Blocks = 16
  102. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"`
  103. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocks_hash,omitempty"`
  104. Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  105. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  106. ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
  107. RawBlockSize int32 `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
  108. // see bep.proto
  109. LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"local_flags,omitempty"`
  110. VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"version_hash,omitempty"`
  111. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  112. RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  113. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  114. }
  115. func (m *FileInfoTruncated) Reset() { *m = FileInfoTruncated{} }
  116. func (*FileInfoTruncated) ProtoMessage() {}
  117. func (*FileInfoTruncated) Descriptor() ([]byte, []int) {
  118. return fileDescriptor_e774e8f5f348d14d, []int{2}
  119. }
  120. func (m *FileInfoTruncated) XXX_Unmarshal(b []byte) error {
  121. return m.Unmarshal(b)
  122. }
  123. func (m *FileInfoTruncated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  124. if deterministic {
  125. return xxx_messageInfo_FileInfoTruncated.Marshal(b, m, deterministic)
  126. } else {
  127. b = b[:cap(b)]
  128. n, err := m.MarshalToSizedBuffer(b)
  129. if err != nil {
  130. return nil, err
  131. }
  132. return b[:n], nil
  133. }
  134. }
  135. func (m *FileInfoTruncated) XXX_Merge(src proto.Message) {
  136. xxx_messageInfo_FileInfoTruncated.Merge(m, src)
  137. }
  138. func (m *FileInfoTruncated) XXX_Size() int {
  139. return m.ProtoSize()
  140. }
  141. func (m *FileInfoTruncated) XXX_DiscardUnknown() {
  142. xxx_messageInfo_FileInfoTruncated.DiscardUnknown(m)
  143. }
  144. var xxx_messageInfo_FileInfoTruncated proto.InternalMessageInfo
  145. // BlockList is the structure used to store block lists
  146. type BlockList struct {
  147. Blocks []protocol.BlockInfo `protobuf:"bytes,1,rep,name=Blocks,proto3" json:"Blocks"`
  148. }
  149. func (m *BlockList) Reset() { *m = BlockList{} }
  150. func (m *BlockList) String() string { return proto.CompactTextString(m) }
  151. func (*BlockList) ProtoMessage() {}
  152. func (*BlockList) Descriptor() ([]byte, []int) {
  153. return fileDescriptor_e774e8f5f348d14d, []int{3}
  154. }
  155. func (m *BlockList) XXX_Unmarshal(b []byte) error {
  156. return m.Unmarshal(b)
  157. }
  158. func (m *BlockList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  159. if deterministic {
  160. return xxx_messageInfo_BlockList.Marshal(b, m, deterministic)
  161. } else {
  162. b = b[:cap(b)]
  163. n, err := m.MarshalToSizedBuffer(b)
  164. if err != nil {
  165. return nil, err
  166. }
  167. return b[:n], nil
  168. }
  169. }
  170. func (m *BlockList) XXX_Merge(src proto.Message) {
  171. xxx_messageInfo_BlockList.Merge(m, src)
  172. }
  173. func (m *BlockList) XXX_Size() int {
  174. return m.ProtoSize()
  175. }
  176. func (m *BlockList) XXX_DiscardUnknown() {
  177. xxx_messageInfo_BlockList.DiscardUnknown(m)
  178. }
  179. var xxx_messageInfo_BlockList proto.InternalMessageInfo
  180. // IndirectionHashesOnly is used to only unmarshal the indirection hashes
  181. // from a FileInfo
  182. type IndirectionHashesOnly struct {
  183. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocks_hash,omitempty"`
  184. VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"version_hash,omitempty"`
  185. }
  186. func (m *IndirectionHashesOnly) Reset() { *m = IndirectionHashesOnly{} }
  187. func (m *IndirectionHashesOnly) String() string { return proto.CompactTextString(m) }
  188. func (*IndirectionHashesOnly) ProtoMessage() {}
  189. func (*IndirectionHashesOnly) Descriptor() ([]byte, []int) {
  190. return fileDescriptor_e774e8f5f348d14d, []int{4}
  191. }
  192. func (m *IndirectionHashesOnly) XXX_Unmarshal(b []byte) error {
  193. return m.Unmarshal(b)
  194. }
  195. func (m *IndirectionHashesOnly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  196. if deterministic {
  197. return xxx_messageInfo_IndirectionHashesOnly.Marshal(b, m, deterministic)
  198. } else {
  199. b = b[:cap(b)]
  200. n, err := m.MarshalToSizedBuffer(b)
  201. if err != nil {
  202. return nil, err
  203. }
  204. return b[:n], nil
  205. }
  206. }
  207. func (m *IndirectionHashesOnly) XXX_Merge(src proto.Message) {
  208. xxx_messageInfo_IndirectionHashesOnly.Merge(m, src)
  209. }
  210. func (m *IndirectionHashesOnly) XXX_Size() int {
  211. return m.ProtoSize()
  212. }
  213. func (m *IndirectionHashesOnly) XXX_DiscardUnknown() {
  214. xxx_messageInfo_IndirectionHashesOnly.DiscardUnknown(m)
  215. }
  216. var xxx_messageInfo_IndirectionHashesOnly proto.InternalMessageInfo
  217. // For each folder and device we keep one of these to track the current
  218. // counts and sequence. We also keep one for the global state of the folder.
  219. type Counts struct {
  220. Files int32 `protobuf:"varint,1,opt,name=files,proto3" json:"files,omitempty"`
  221. Directories int32 `protobuf:"varint,2,opt,name=directories,proto3" json:"directories,omitempty"`
  222. Symlinks int32 `protobuf:"varint,3,opt,name=symlinks,proto3" json:"symlinks,omitempty"`
  223. Deleted int32 `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
  224. Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"`
  225. Sequence int64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence,omitempty"`
  226. DeviceID []byte `protobuf:"bytes,17,opt,name=deviceID,proto3" json:"deviceID,omitempty"`
  227. LocalFlags uint32 `protobuf:"varint,18,opt,name=localFlags,proto3" json:"localFlags,omitempty"`
  228. }
  229. func (m *Counts) Reset() { *m = Counts{} }
  230. func (m *Counts) String() string { return proto.CompactTextString(m) }
  231. func (*Counts) ProtoMessage() {}
  232. func (*Counts) Descriptor() ([]byte, []int) {
  233. return fileDescriptor_e774e8f5f348d14d, []int{5}
  234. }
  235. func (m *Counts) XXX_Unmarshal(b []byte) error {
  236. return m.Unmarshal(b)
  237. }
  238. func (m *Counts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  239. if deterministic {
  240. return xxx_messageInfo_Counts.Marshal(b, m, deterministic)
  241. } else {
  242. b = b[:cap(b)]
  243. n, err := m.MarshalToSizedBuffer(b)
  244. if err != nil {
  245. return nil, err
  246. }
  247. return b[:n], nil
  248. }
  249. }
  250. func (m *Counts) XXX_Merge(src proto.Message) {
  251. xxx_messageInfo_Counts.Merge(m, src)
  252. }
  253. func (m *Counts) XXX_Size() int {
  254. return m.ProtoSize()
  255. }
  256. func (m *Counts) XXX_DiscardUnknown() {
  257. xxx_messageInfo_Counts.DiscardUnknown(m)
  258. }
  259. var xxx_messageInfo_Counts proto.InternalMessageInfo
  260. type CountsSet struct {
  261. Counts []Counts `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts"`
  262. Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"`
  263. }
  264. func (m *CountsSet) Reset() { *m = CountsSet{} }
  265. func (m *CountsSet) String() string { return proto.CompactTextString(m) }
  266. func (*CountsSet) ProtoMessage() {}
  267. func (*CountsSet) Descriptor() ([]byte, []int) {
  268. return fileDescriptor_e774e8f5f348d14d, []int{6}
  269. }
  270. func (m *CountsSet) XXX_Unmarshal(b []byte) error {
  271. return m.Unmarshal(b)
  272. }
  273. func (m *CountsSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  274. if deterministic {
  275. return xxx_messageInfo_CountsSet.Marshal(b, m, deterministic)
  276. } else {
  277. b = b[:cap(b)]
  278. n, err := m.MarshalToSizedBuffer(b)
  279. if err != nil {
  280. return nil, err
  281. }
  282. return b[:n], nil
  283. }
  284. }
  285. func (m *CountsSet) XXX_Merge(src proto.Message) {
  286. xxx_messageInfo_CountsSet.Merge(m, src)
  287. }
  288. func (m *CountsSet) XXX_Size() int {
  289. return m.ProtoSize()
  290. }
  291. func (m *CountsSet) XXX_DiscardUnknown() {
  292. xxx_messageInfo_CountsSet.DiscardUnknown(m)
  293. }
  294. var xxx_messageInfo_CountsSet proto.InternalMessageInfo
  295. type FileVersionDeprecated struct {
  296. Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
  297. Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
  298. Invalid bool `protobuf:"varint,3,opt,name=invalid,proto3" json:"invalid,omitempty"`
  299. Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
  300. }
  301. func (m *FileVersionDeprecated) Reset() { *m = FileVersionDeprecated{} }
  302. func (m *FileVersionDeprecated) String() string { return proto.CompactTextString(m) }
  303. func (*FileVersionDeprecated) ProtoMessage() {}
  304. func (*FileVersionDeprecated) Descriptor() ([]byte, []int) {
  305. return fileDescriptor_e774e8f5f348d14d, []int{7}
  306. }
  307. func (m *FileVersionDeprecated) XXX_Unmarshal(b []byte) error {
  308. return m.Unmarshal(b)
  309. }
  310. func (m *FileVersionDeprecated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  311. if deterministic {
  312. return xxx_messageInfo_FileVersionDeprecated.Marshal(b, m, deterministic)
  313. } else {
  314. b = b[:cap(b)]
  315. n, err := m.MarshalToSizedBuffer(b)
  316. if err != nil {
  317. return nil, err
  318. }
  319. return b[:n], nil
  320. }
  321. }
  322. func (m *FileVersionDeprecated) XXX_Merge(src proto.Message) {
  323. xxx_messageInfo_FileVersionDeprecated.Merge(m, src)
  324. }
  325. func (m *FileVersionDeprecated) XXX_Size() int {
  326. return m.ProtoSize()
  327. }
  328. func (m *FileVersionDeprecated) XXX_DiscardUnknown() {
  329. xxx_messageInfo_FileVersionDeprecated.DiscardUnknown(m)
  330. }
  331. var xxx_messageInfo_FileVersionDeprecated proto.InternalMessageInfo
  332. type VersionListDeprecated struct {
  333. Versions []FileVersionDeprecated `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions"`
  334. }
  335. func (m *VersionListDeprecated) Reset() { *m = VersionListDeprecated{} }
  336. func (*VersionListDeprecated) ProtoMessage() {}
  337. func (*VersionListDeprecated) Descriptor() ([]byte, []int) {
  338. return fileDescriptor_e774e8f5f348d14d, []int{8}
  339. }
  340. func (m *VersionListDeprecated) XXX_Unmarshal(b []byte) error {
  341. return m.Unmarshal(b)
  342. }
  343. func (m *VersionListDeprecated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  344. if deterministic {
  345. return xxx_messageInfo_VersionListDeprecated.Marshal(b, m, deterministic)
  346. } else {
  347. b = b[:cap(b)]
  348. n, err := m.MarshalToSizedBuffer(b)
  349. if err != nil {
  350. return nil, err
  351. }
  352. return b[:n], nil
  353. }
  354. }
  355. func (m *VersionListDeprecated) XXX_Merge(src proto.Message) {
  356. xxx_messageInfo_VersionListDeprecated.Merge(m, src)
  357. }
  358. func (m *VersionListDeprecated) XXX_Size() int {
  359. return m.ProtoSize()
  360. }
  361. func (m *VersionListDeprecated) XXX_DiscardUnknown() {
  362. xxx_messageInfo_VersionListDeprecated.DiscardUnknown(m)
  363. }
  364. var xxx_messageInfo_VersionListDeprecated proto.InternalMessageInfo
  365. func init() {
  366. proto.RegisterType((*FileVersion)(nil), "db.FileVersion")
  367. proto.RegisterType((*VersionList)(nil), "db.VersionList")
  368. proto.RegisterType((*FileInfoTruncated)(nil), "db.FileInfoTruncated")
  369. proto.RegisterType((*BlockList)(nil), "db.BlockList")
  370. proto.RegisterType((*IndirectionHashesOnly)(nil), "db.IndirectionHashesOnly")
  371. proto.RegisterType((*Counts)(nil), "db.Counts")
  372. proto.RegisterType((*CountsSet)(nil), "db.CountsSet")
  373. proto.RegisterType((*FileVersionDeprecated)(nil), "db.FileVersionDeprecated")
  374. proto.RegisterType((*VersionListDeprecated)(nil), "db.VersionListDeprecated")
  375. }
  376. func init() { proto.RegisterFile("structs.proto", fileDescriptor_e774e8f5f348d14d) }
  377. var fileDescriptor_e774e8f5f348d14d = []byte{
  378. // 861 bytes of a gzipped FileDescriptorProto
  379. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x8f, 0xdb, 0x54,
  380. 0x10, 0x8f, 0x9b, 0xff, 0xe3, 0x64, 0xdb, 0xbe, 0x76, 0x57, 0x66, 0x25, 0x1c, 0xcb, 0x08, 0x61,
  381. 0x71, 0x48, 0x60, 0x7b, 0xa3, 0x12, 0x42, 0x61, 0x55, 0x11, 0x09, 0x51, 0xf4, 0xb6, 0xf4, 0x80,
  382. 0x2a, 0x45, 0xb6, 0xf3, 0x92, 0x3c, 0xd5, 0xf1, 0x0b, 0x7e, 0xce, 0xae, 0xdc, 0x4f, 0xc1, 0x05,
  383. 0x89, 0x03, 0x87, 0x5e, 0xf8, 0x2e, 0x7b, 0xec, 0x11, 0x71, 0x88, 0x20, 0xcb, 0x01, 0xbe, 0x05,
  384. 0x7a, 0xf3, 0x6c, 0xc7, 0x1b, 0x0e, 0xb4, 0xb7, 0x99, 0xdf, 0xcc, 0xf3, 0xcc, 0xfc, 0xe6, 0xe7,
  385. 0x81, 0xbe, 0x4c, 0x93, 0x4d, 0x98, 0xca, 0xe1, 0x3a, 0x11, 0xa9, 0x20, 0x77, 0x66, 0xc1, 0xe9,
  386. 0x07, 0x09, 0x5b, 0x0b, 0x39, 0x42, 0x20, 0xd8, 0xcc, 0x47, 0x0b, 0xb1, 0x10, 0xe8, 0xa0, 0xa5,
  387. 0x13, 0x4f, 0x4f, 0x22, 0x1e, 0xe8, 0x94, 0x50, 0x44, 0xa3, 0x80, 0xad, 0x35, 0xee, 0xfe, 0x62,
  388. 0x80, 0xf9, 0x84, 0x47, 0xec, 0x39, 0x4b, 0x24, 0x17, 0x31, 0xf9, 0x04, 0xda, 0x97, 0xda, 0xb4,
  389. 0x0c, 0xc7, 0xf0, 0xcc, 0xb3, 0x7b, 0xc3, 0xe2, 0xd5, 0xf0, 0x39, 0x0b, 0x53, 0x91, 0x8c, 0x1b,
  390. 0xd7, 0xdb, 0x41, 0x8d, 0x16, 0x69, 0xc4, 0x82, 0xf6, 0x8c, 0x45, 0x2c, 0x65, 0x33, 0xeb, 0x8e,
  391. 0x63, 0x78, 0x1d, 0x5a, 0xb8, 0x3a, 0x72, 0xc9, 0x43, 0x26, 0xad, 0xba, 0x53, 0xf7, 0x7a, 0xb4,
  392. 0x70, 0xc9, 0x47, 0x70, 0x97, 0xc7, 0x97, 0x7e, 0xc4, 0x67, 0xd3, 0x22, 0xa3, 0x81, 0x19, 0x47,
  393. 0x39, 0x7c, 0xae, 0x51, 0xf7, 0x3b, 0x30, 0xf3, 0xce, 0xbe, 0xe6, 0x32, 0x25, 0x5f, 0x40, 0x27,
  394. 0x2f, 0x2b, 0x2d, 0xc3, 0xa9, 0x7b, 0xe6, 0xd9, 0xdd, 0xe1, 0x2c, 0x18, 0x56, 0x06, 0x18, 0x3f,
  395. 0x50, 0xdd, 0xed, 0xb6, 0x03, 0x93, 0xfa, 0x57, 0x39, 0x26, 0x69, 0xf9, 0xea, 0xb3, 0xc6, 0xcf,
  396. 0xaf, 0x07, 0x35, 0xf7, 0xd7, 0x26, 0xdc, 0x57, 0x8f, 0x26, 0xf1, 0x5c, 0x3c, 0x4b, 0x36, 0x71,
  397. 0xe8, 0xab, 0x7e, 0x09, 0x34, 0x62, 0x7f, 0xc5, 0x70, 0xf0, 0x2e, 0x45, 0x5b, 0x61, 0x92, 0xbf,
  398. 0x62, 0x56, 0xdd, 0x31, 0xbc, 0x3a, 0x45, 0x9b, 0xbc, 0x0f, 0xb0, 0x12, 0x33, 0x3e, 0xe7, 0x6c,
  399. 0x36, 0x95, 0x56, 0x13, 0x23, 0xdd, 0x02, 0xb9, 0x20, 0x2f, 0xc0, 0x2c, 0xc3, 0x41, 0x66, 0xf5,
  400. 0x1c, 0xc3, 0x6b, 0x8c, 0x1f, 0xab, 0xb6, 0x7e, 0xdf, 0x0e, 0x1e, 0x2d, 0x78, 0xba, 0xdc, 0x04,
  401. 0xc3, 0x50, 0xac, 0x46, 0x32, 0x8b, 0xc3, 0x74, 0xc9, 0xe3, 0x45, 0xc5, 0xaa, 0xae, 0x69, 0x78,
  402. 0xb1, 0x14, 0x49, 0x3a, 0x39, 0xa7, 0x65, 0xb9, 0x71, 0x56, 0x5d, 0x50, 0xf7, 0xed, 0x16, 0x74,
  403. 0x0a, 0x1d, 0xc9, 0x7e, 0xd8, 0xb0, 0x38, 0x64, 0x16, 0x60, 0xb3, 0xa5, 0x4f, 0x3e, 0x84, 0x23,
  404. 0x99, 0xad, 0x22, 0x1e, 0xbf, 0x9c, 0xa6, 0x7e, 0xb2, 0x60, 0xa9, 0x75, 0x1f, 0x87, 0xef, 0xe7,
  405. 0xe8, 0x33, 0x04, 0xc9, 0x00, 0xcc, 0x20, 0x12, 0xe1, 0x4b, 0x39, 0x5d, 0xfa, 0x72, 0x69, 0x11,
  406. 0xc7, 0xf0, 0x7a, 0x14, 0x34, 0xf4, 0x95, 0x2f, 0x97, 0xe4, 0x63, 0x68, 0xa4, 0xd9, 0x9a, 0xa1,
  407. 0x02, 0x8e, 0xce, 0x4e, 0xf6, 0x2d, 0x95, 0x2c, 0x67, 0x6b, 0x46, 0x31, 0x87, 0x38, 0x60, 0xae,
  408. 0x59, 0xb2, 0xe2, 0x52, 0xef, 0xb1, 0xe1, 0x18, 0x5e, 0x9f, 0x56, 0x21, 0x55, 0xae, 0x64, 0x30,
  409. 0x96, 0x96, 0xe9, 0x18, 0x5e, 0x73, 0x4f, 0xc2, 0x37, 0x92, 0x8c, 0x40, 0x17, 0x9f, 0xe2, 0x6e,
  410. 0xfa, 0x2a, 0x3e, 0xbe, 0xb7, 0xdb, 0x0e, 0x7a, 0xd4, 0xbf, 0x1a, 0xab, 0xc0, 0x05, 0x7f, 0xc5,
  411. 0x68, 0x37, 0x28, 0x4c, 0x55, 0x33, 0x12, 0xa1, 0x1f, 0x4d, 0xe7, 0x91, 0xbf, 0x90, 0xd6, 0xdf,
  412. 0x6d, 0x2c, 0x0a, 0x88, 0x3d, 0x51, 0x10, 0x71, 0xa1, 0x97, 0x13, 0xa6, 0x67, 0xfc, 0xa7, 0x8d,
  413. 0x43, 0x9a, 0x39, 0x88, 0x53, 0x56, 0xa4, 0xde, 0xba, 0x2d, 0x75, 0x0f, 0xda, 0xb9, 0x72, 0x2d,
  414. 0xf5, 0xae, 0x33, 0x3e, 0xda, 0x6d, 0x07, 0x40, 0xfd, 0xab, 0x89, 0x46, 0x69, 0x11, 0x56, 0x8c,
  415. 0xc7, 0x62, 0x5a, 0x25, 0xa0, 0x83, 0x9f, 0xea, 0xc7, 0xe2, 0xdb, 0x3d, 0x98, 0xeb, 0xf4, 0x73,
  416. 0xe8, 0xe2, 0x38, 0x28, 0xfe, 0x4f, 0xa1, 0x85, 0x4e, 0x21, 0xfd, 0x07, 0x7b, 0x96, 0x11, 0x57,
  417. 0x34, 0xe7, 0xbb, 0xcf, 0x13, 0xdd, 0x17, 0x70, 0x3c, 0x89, 0x67, 0x3c, 0x61, 0x61, 0x9a, 0xcf,
  418. 0xc0, 0xe4, 0xd3, 0x38, 0xca, 0xfe, 0x7f, 0xa1, 0x6f, 0x41, 0x87, 0xfb, 0x97, 0x01, 0xad, 0x2f,
  419. 0xc5, 0x26, 0x4e, 0x25, 0x79, 0x08, 0xcd, 0x39, 0x8f, 0x98, 0xc4, 0x7f, 0xa7, 0x49, 0xb5, 0xa3,
  420. 0x58, 0xd7, 0xc5, 0x45, 0xc2, 0x99, 0x44, 0x71, 0x34, 0x69, 0x15, 0x42, 0x6d, 0x6a, 0xa5, 0x49,
  421. 0xfc, 0xc5, 0x9a, 0xb4, 0xf4, 0xab, 0x6c, 0x37, 0x30, 0x54, 0xb2, 0xfd, 0x10, 0x9a, 0x41, 0x96,
  422. 0xb2, 0xe2, 0xdf, 0xd3, 0xce, 0x2d, 0x9d, 0xb7, 0x0e, 0x74, 0x7e, 0x0a, 0x1d, 0x7d, 0x68, 0x26,
  423. 0xe7, 0xa8, 0xf0, 0x1e, 0x2d, 0x7d, 0x62, 0x43, 0x45, 0x07, 0x48, 0xc5, 0x2d, 0x65, 0xb8, 0x4f,
  424. 0xa1, 0xab, 0xa7, 0xbc, 0x60, 0x29, 0xf1, 0xa0, 0x15, 0xa2, 0x93, 0x2f, 0x01, 0xd4, 0xfd, 0xd1,
  425. 0xe1, 0x82, 0x7b, 0x1d, 0x57, 0xed, 0x87, 0x09, 0xf3, 0x8b, 0xbb, 0x58, 0xa7, 0x85, 0xeb, 0xfe,
  426. 0x64, 0xc0, 0x71, 0xe5, 0x64, 0x9d, 0xb3, 0x75, 0xc2, 0xf4, 0x05, 0x7a, 0xf7, 0xeb, 0x7b, 0x02,
  427. 0x2d, 0x3d, 0x08, 0x16, 0xe9, 0xd1, 0xdc, 0x53, 0xd5, 0x0b, 0x41, 0xd6, 0xb5, 0x54, 0x0b, 0x01,
  428. 0x1e, 0xd0, 0xba, 0x17, 0xb1, 0xfb, 0x3d, 0x1c, 0x57, 0x8e, 0x6d, 0xa5, 0xad, 0xc7, 0xff, 0x39,
  429. 0xbb, 0xef, 0x1d, 0x9c, 0xdd, 0x7d, 0x72, 0xde, 0xe0, 0xc1, 0xc5, 0x1d, 0x3b, 0xd7, 0x7f, 0xda,
  430. 0xb5, 0xeb, 0x9d, 0x6d, 0xbc, 0xd9, 0xd9, 0xc6, 0x1f, 0x3b, 0xbb, 0xf6, 0xe3, 0x8d, 0x5d, 0x7b,
  431. 0x7d, 0x63, 0x1b, 0x6f, 0x6e, 0xec, 0xda, 0x6f, 0x37, 0x76, 0x2d, 0x68, 0xe1, 0xa4, 0x8f, 0xfe,
  432. 0x0d, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xe1, 0xbd, 0x08, 0xe2, 0x06, 0x00, 0x00,
  433. }
  434. func (m *FileVersion) Marshal() (dAtA []byte, err error) {
  435. size := m.ProtoSize()
  436. dAtA = make([]byte, size)
  437. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  438. if err != nil {
  439. return nil, err
  440. }
  441. return dAtA[:n], nil
  442. }
  443. func (m *FileVersion) MarshalTo(dAtA []byte) (int, error) {
  444. size := m.ProtoSize()
  445. return m.MarshalToSizedBuffer(dAtA[:size])
  446. }
  447. func (m *FileVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  448. i := len(dAtA)
  449. _ = i
  450. var l int
  451. _ = l
  452. if len(m.InvalidDevices) > 0 {
  453. for iNdEx := len(m.InvalidDevices) - 1; iNdEx >= 0; iNdEx-- {
  454. i -= len(m.InvalidDevices[iNdEx])
  455. copy(dAtA[i:], m.InvalidDevices[iNdEx])
  456. i = encodeVarintStructs(dAtA, i, uint64(len(m.InvalidDevices[iNdEx])))
  457. i--
  458. dAtA[i] = 0x22
  459. }
  460. }
  461. if len(m.Devices) > 0 {
  462. for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  463. i -= len(m.Devices[iNdEx])
  464. copy(dAtA[i:], m.Devices[iNdEx])
  465. i = encodeVarintStructs(dAtA, i, uint64(len(m.Devices[iNdEx])))
  466. i--
  467. dAtA[i] = 0x1a
  468. }
  469. }
  470. if m.Deleted {
  471. i--
  472. if m.Deleted {
  473. dAtA[i] = 1
  474. } else {
  475. dAtA[i] = 0
  476. }
  477. i--
  478. dAtA[i] = 0x10
  479. }
  480. {
  481. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  482. if err != nil {
  483. return 0, err
  484. }
  485. i -= size
  486. i = encodeVarintStructs(dAtA, i, uint64(size))
  487. }
  488. i--
  489. dAtA[i] = 0xa
  490. return len(dAtA) - i, nil
  491. }
  492. func (m *VersionList) Marshal() (dAtA []byte, err error) {
  493. size := m.ProtoSize()
  494. dAtA = make([]byte, size)
  495. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  496. if err != nil {
  497. return nil, err
  498. }
  499. return dAtA[:n], nil
  500. }
  501. func (m *VersionList) MarshalTo(dAtA []byte) (int, error) {
  502. size := m.ProtoSize()
  503. return m.MarshalToSizedBuffer(dAtA[:size])
  504. }
  505. func (m *VersionList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  506. i := len(dAtA)
  507. _ = i
  508. var l int
  509. _ = l
  510. if len(m.RawVersions) > 0 {
  511. for iNdEx := len(m.RawVersions) - 1; iNdEx >= 0; iNdEx-- {
  512. {
  513. size, err := m.RawVersions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  514. if err != nil {
  515. return 0, err
  516. }
  517. i -= size
  518. i = encodeVarintStructs(dAtA, i, uint64(size))
  519. }
  520. i--
  521. dAtA[i] = 0xa
  522. }
  523. }
  524. return len(dAtA) - i, nil
  525. }
  526. func (m *FileInfoTruncated) Marshal() (dAtA []byte, err error) {
  527. size := m.ProtoSize()
  528. dAtA = make([]byte, size)
  529. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  530. if err != nil {
  531. return nil, err
  532. }
  533. return dAtA[:n], nil
  534. }
  535. func (m *FileInfoTruncated) MarshalTo(dAtA []byte) (int, error) {
  536. size := m.ProtoSize()
  537. return m.MarshalToSizedBuffer(dAtA[:size])
  538. }
  539. func (m *FileInfoTruncated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  540. i := len(dAtA)
  541. _ = i
  542. var l int
  543. _ = l
  544. if len(m.VersionHash) > 0 {
  545. i -= len(m.VersionHash)
  546. copy(dAtA[i:], m.VersionHash)
  547. i = encodeVarintStructs(dAtA, i, uint64(len(m.VersionHash)))
  548. i--
  549. dAtA[i] = 0x3e
  550. i--
  551. dAtA[i] = 0xca
  552. }
  553. if m.LocalFlags != 0 {
  554. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  555. i--
  556. dAtA[i] = 0x3e
  557. i--
  558. dAtA[i] = 0xc0
  559. }
  560. if len(m.BlocksHash) > 0 {
  561. i -= len(m.BlocksHash)
  562. copy(dAtA[i:], m.BlocksHash)
  563. i = encodeVarintStructs(dAtA, i, uint64(len(m.BlocksHash)))
  564. i--
  565. dAtA[i] = 0x1
  566. i--
  567. dAtA[i] = 0x92
  568. }
  569. if len(m.SymlinkTarget) > 0 {
  570. i -= len(m.SymlinkTarget)
  571. copy(dAtA[i:], m.SymlinkTarget)
  572. i = encodeVarintStructs(dAtA, i, uint64(len(m.SymlinkTarget)))
  573. i--
  574. dAtA[i] = 0x1
  575. i--
  576. dAtA[i] = 0x8a
  577. }
  578. if m.RawBlockSize != 0 {
  579. i = encodeVarintStructs(dAtA, i, uint64(m.RawBlockSize))
  580. i--
  581. dAtA[i] = 0x68
  582. }
  583. if m.ModifiedBy != 0 {
  584. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedBy))
  585. i--
  586. dAtA[i] = 0x60
  587. }
  588. if m.ModifiedNs != 0 {
  589. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedNs))
  590. i--
  591. dAtA[i] = 0x58
  592. }
  593. if m.Sequence != 0 {
  594. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  595. i--
  596. dAtA[i] = 0x50
  597. }
  598. {
  599. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  600. if err != nil {
  601. return 0, err
  602. }
  603. i -= size
  604. i = encodeVarintStructs(dAtA, i, uint64(size))
  605. }
  606. i--
  607. dAtA[i] = 0x4a
  608. if m.NoPermissions {
  609. i--
  610. if m.NoPermissions {
  611. dAtA[i] = 1
  612. } else {
  613. dAtA[i] = 0
  614. }
  615. i--
  616. dAtA[i] = 0x40
  617. }
  618. if m.RawInvalid {
  619. i--
  620. if m.RawInvalid {
  621. dAtA[i] = 1
  622. } else {
  623. dAtA[i] = 0
  624. }
  625. i--
  626. dAtA[i] = 0x38
  627. }
  628. if m.Deleted {
  629. i--
  630. if m.Deleted {
  631. dAtA[i] = 1
  632. } else {
  633. dAtA[i] = 0
  634. }
  635. i--
  636. dAtA[i] = 0x30
  637. }
  638. if m.ModifiedS != 0 {
  639. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedS))
  640. i--
  641. dAtA[i] = 0x28
  642. }
  643. if m.Permissions != 0 {
  644. i = encodeVarintStructs(dAtA, i, uint64(m.Permissions))
  645. i--
  646. dAtA[i] = 0x20
  647. }
  648. if m.Size != 0 {
  649. i = encodeVarintStructs(dAtA, i, uint64(m.Size))
  650. i--
  651. dAtA[i] = 0x18
  652. }
  653. if m.Type != 0 {
  654. i = encodeVarintStructs(dAtA, i, uint64(m.Type))
  655. i--
  656. dAtA[i] = 0x10
  657. }
  658. if len(m.Name) > 0 {
  659. i -= len(m.Name)
  660. copy(dAtA[i:], m.Name)
  661. i = encodeVarintStructs(dAtA, i, uint64(len(m.Name)))
  662. i--
  663. dAtA[i] = 0xa
  664. }
  665. return len(dAtA) - i, nil
  666. }
  667. func (m *BlockList) Marshal() (dAtA []byte, err error) {
  668. size := m.ProtoSize()
  669. dAtA = make([]byte, size)
  670. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  671. if err != nil {
  672. return nil, err
  673. }
  674. return dAtA[:n], nil
  675. }
  676. func (m *BlockList) MarshalTo(dAtA []byte) (int, error) {
  677. size := m.ProtoSize()
  678. return m.MarshalToSizedBuffer(dAtA[:size])
  679. }
  680. func (m *BlockList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  681. i := len(dAtA)
  682. _ = i
  683. var l int
  684. _ = l
  685. if len(m.Blocks) > 0 {
  686. for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
  687. {
  688. size, err := m.Blocks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  689. if err != nil {
  690. return 0, err
  691. }
  692. i -= size
  693. i = encodeVarintStructs(dAtA, i, uint64(size))
  694. }
  695. i--
  696. dAtA[i] = 0xa
  697. }
  698. }
  699. return len(dAtA) - i, nil
  700. }
  701. func (m *IndirectionHashesOnly) Marshal() (dAtA []byte, err error) {
  702. size := m.ProtoSize()
  703. dAtA = make([]byte, size)
  704. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  705. if err != nil {
  706. return nil, err
  707. }
  708. return dAtA[:n], nil
  709. }
  710. func (m *IndirectionHashesOnly) MarshalTo(dAtA []byte) (int, error) {
  711. size := m.ProtoSize()
  712. return m.MarshalToSizedBuffer(dAtA[:size])
  713. }
  714. func (m *IndirectionHashesOnly) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  715. i := len(dAtA)
  716. _ = i
  717. var l int
  718. _ = l
  719. if len(m.VersionHash) > 0 {
  720. i -= len(m.VersionHash)
  721. copy(dAtA[i:], m.VersionHash)
  722. i = encodeVarintStructs(dAtA, i, uint64(len(m.VersionHash)))
  723. i--
  724. dAtA[i] = 0x3e
  725. i--
  726. dAtA[i] = 0xca
  727. }
  728. if len(m.BlocksHash) > 0 {
  729. i -= len(m.BlocksHash)
  730. copy(dAtA[i:], m.BlocksHash)
  731. i = encodeVarintStructs(dAtA, i, uint64(len(m.BlocksHash)))
  732. i--
  733. dAtA[i] = 0x1
  734. i--
  735. dAtA[i] = 0x92
  736. }
  737. return len(dAtA) - i, nil
  738. }
  739. func (m *Counts) Marshal() (dAtA []byte, err error) {
  740. size := m.ProtoSize()
  741. dAtA = make([]byte, size)
  742. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  743. if err != nil {
  744. return nil, err
  745. }
  746. return dAtA[:n], nil
  747. }
  748. func (m *Counts) MarshalTo(dAtA []byte) (int, error) {
  749. size := m.ProtoSize()
  750. return m.MarshalToSizedBuffer(dAtA[:size])
  751. }
  752. func (m *Counts) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  753. i := len(dAtA)
  754. _ = i
  755. var l int
  756. _ = l
  757. if m.LocalFlags != 0 {
  758. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  759. i--
  760. dAtA[i] = 0x1
  761. i--
  762. dAtA[i] = 0x90
  763. }
  764. if len(m.DeviceID) > 0 {
  765. i -= len(m.DeviceID)
  766. copy(dAtA[i:], m.DeviceID)
  767. i = encodeVarintStructs(dAtA, i, uint64(len(m.DeviceID)))
  768. i--
  769. dAtA[i] = 0x1
  770. i--
  771. dAtA[i] = 0x8a
  772. }
  773. if m.Sequence != 0 {
  774. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  775. i--
  776. dAtA[i] = 0x30
  777. }
  778. if m.Bytes != 0 {
  779. i = encodeVarintStructs(dAtA, i, uint64(m.Bytes))
  780. i--
  781. dAtA[i] = 0x28
  782. }
  783. if m.Deleted != 0 {
  784. i = encodeVarintStructs(dAtA, i, uint64(m.Deleted))
  785. i--
  786. dAtA[i] = 0x20
  787. }
  788. if m.Symlinks != 0 {
  789. i = encodeVarintStructs(dAtA, i, uint64(m.Symlinks))
  790. i--
  791. dAtA[i] = 0x18
  792. }
  793. if m.Directories != 0 {
  794. i = encodeVarintStructs(dAtA, i, uint64(m.Directories))
  795. i--
  796. dAtA[i] = 0x10
  797. }
  798. if m.Files != 0 {
  799. i = encodeVarintStructs(dAtA, i, uint64(m.Files))
  800. i--
  801. dAtA[i] = 0x8
  802. }
  803. return len(dAtA) - i, nil
  804. }
  805. func (m *CountsSet) Marshal() (dAtA []byte, err error) {
  806. size := m.ProtoSize()
  807. dAtA = make([]byte, size)
  808. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  809. if err != nil {
  810. return nil, err
  811. }
  812. return dAtA[:n], nil
  813. }
  814. func (m *CountsSet) MarshalTo(dAtA []byte) (int, error) {
  815. size := m.ProtoSize()
  816. return m.MarshalToSizedBuffer(dAtA[:size])
  817. }
  818. func (m *CountsSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  819. i := len(dAtA)
  820. _ = i
  821. var l int
  822. _ = l
  823. if m.Created != 0 {
  824. i = encodeVarintStructs(dAtA, i, uint64(m.Created))
  825. i--
  826. dAtA[i] = 0x10
  827. }
  828. if len(m.Counts) > 0 {
  829. for iNdEx := len(m.Counts) - 1; iNdEx >= 0; iNdEx-- {
  830. {
  831. size, err := m.Counts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  832. if err != nil {
  833. return 0, err
  834. }
  835. i -= size
  836. i = encodeVarintStructs(dAtA, i, uint64(size))
  837. }
  838. i--
  839. dAtA[i] = 0xa
  840. }
  841. }
  842. return len(dAtA) - i, nil
  843. }
  844. func (m *FileVersionDeprecated) Marshal() (dAtA []byte, err error) {
  845. size := m.ProtoSize()
  846. dAtA = make([]byte, size)
  847. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  848. if err != nil {
  849. return nil, err
  850. }
  851. return dAtA[:n], nil
  852. }
  853. func (m *FileVersionDeprecated) MarshalTo(dAtA []byte) (int, error) {
  854. size := m.ProtoSize()
  855. return m.MarshalToSizedBuffer(dAtA[:size])
  856. }
  857. func (m *FileVersionDeprecated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  858. i := len(dAtA)
  859. _ = i
  860. var l int
  861. _ = l
  862. if m.Deleted {
  863. i--
  864. if m.Deleted {
  865. dAtA[i] = 1
  866. } else {
  867. dAtA[i] = 0
  868. }
  869. i--
  870. dAtA[i] = 0x20
  871. }
  872. if m.Invalid {
  873. i--
  874. if m.Invalid {
  875. dAtA[i] = 1
  876. } else {
  877. dAtA[i] = 0
  878. }
  879. i--
  880. dAtA[i] = 0x18
  881. }
  882. if len(m.Device) > 0 {
  883. i -= len(m.Device)
  884. copy(dAtA[i:], m.Device)
  885. i = encodeVarintStructs(dAtA, i, uint64(len(m.Device)))
  886. i--
  887. dAtA[i] = 0x12
  888. }
  889. {
  890. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  891. if err != nil {
  892. return 0, err
  893. }
  894. i -= size
  895. i = encodeVarintStructs(dAtA, i, uint64(size))
  896. }
  897. i--
  898. dAtA[i] = 0xa
  899. return len(dAtA) - i, nil
  900. }
  901. func (m *VersionListDeprecated) Marshal() (dAtA []byte, err error) {
  902. size := m.ProtoSize()
  903. dAtA = make([]byte, size)
  904. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  905. if err != nil {
  906. return nil, err
  907. }
  908. return dAtA[:n], nil
  909. }
  910. func (m *VersionListDeprecated) MarshalTo(dAtA []byte) (int, error) {
  911. size := m.ProtoSize()
  912. return m.MarshalToSizedBuffer(dAtA[:size])
  913. }
  914. func (m *VersionListDeprecated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  915. i := len(dAtA)
  916. _ = i
  917. var l int
  918. _ = l
  919. if len(m.Versions) > 0 {
  920. for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- {
  921. {
  922. size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  923. if err != nil {
  924. return 0, err
  925. }
  926. i -= size
  927. i = encodeVarintStructs(dAtA, i, uint64(size))
  928. }
  929. i--
  930. dAtA[i] = 0xa
  931. }
  932. }
  933. return len(dAtA) - i, nil
  934. }
  935. func encodeVarintStructs(dAtA []byte, offset int, v uint64) int {
  936. offset -= sovStructs(v)
  937. base := offset
  938. for v >= 1<<7 {
  939. dAtA[offset] = uint8(v&0x7f | 0x80)
  940. v >>= 7
  941. offset++
  942. }
  943. dAtA[offset] = uint8(v)
  944. return base
  945. }
  946. func (m *FileVersion) ProtoSize() (n int) {
  947. if m == nil {
  948. return 0
  949. }
  950. var l int
  951. _ = l
  952. l = m.Version.ProtoSize()
  953. n += 1 + l + sovStructs(uint64(l))
  954. if m.Deleted {
  955. n += 2
  956. }
  957. if len(m.Devices) > 0 {
  958. for _, b := range m.Devices {
  959. l = len(b)
  960. n += 1 + l + sovStructs(uint64(l))
  961. }
  962. }
  963. if len(m.InvalidDevices) > 0 {
  964. for _, b := range m.InvalidDevices {
  965. l = len(b)
  966. n += 1 + l + sovStructs(uint64(l))
  967. }
  968. }
  969. return n
  970. }
  971. func (m *VersionList) ProtoSize() (n int) {
  972. if m == nil {
  973. return 0
  974. }
  975. var l int
  976. _ = l
  977. if len(m.RawVersions) > 0 {
  978. for _, e := range m.RawVersions {
  979. l = e.ProtoSize()
  980. n += 1 + l + sovStructs(uint64(l))
  981. }
  982. }
  983. return n
  984. }
  985. func (m *FileInfoTruncated) ProtoSize() (n int) {
  986. if m == nil {
  987. return 0
  988. }
  989. var l int
  990. _ = l
  991. l = len(m.Name)
  992. if l > 0 {
  993. n += 1 + l + sovStructs(uint64(l))
  994. }
  995. if m.Type != 0 {
  996. n += 1 + sovStructs(uint64(m.Type))
  997. }
  998. if m.Size != 0 {
  999. n += 1 + sovStructs(uint64(m.Size))
  1000. }
  1001. if m.Permissions != 0 {
  1002. n += 1 + sovStructs(uint64(m.Permissions))
  1003. }
  1004. if m.ModifiedS != 0 {
  1005. n += 1 + sovStructs(uint64(m.ModifiedS))
  1006. }
  1007. if m.Deleted {
  1008. n += 2
  1009. }
  1010. if m.RawInvalid {
  1011. n += 2
  1012. }
  1013. if m.NoPermissions {
  1014. n += 2
  1015. }
  1016. l = m.Version.ProtoSize()
  1017. n += 1 + l + sovStructs(uint64(l))
  1018. if m.Sequence != 0 {
  1019. n += 1 + sovStructs(uint64(m.Sequence))
  1020. }
  1021. if m.ModifiedNs != 0 {
  1022. n += 1 + sovStructs(uint64(m.ModifiedNs))
  1023. }
  1024. if m.ModifiedBy != 0 {
  1025. n += 1 + sovStructs(uint64(m.ModifiedBy))
  1026. }
  1027. if m.RawBlockSize != 0 {
  1028. n += 1 + sovStructs(uint64(m.RawBlockSize))
  1029. }
  1030. l = len(m.SymlinkTarget)
  1031. if l > 0 {
  1032. n += 2 + l + sovStructs(uint64(l))
  1033. }
  1034. l = len(m.BlocksHash)
  1035. if l > 0 {
  1036. n += 2 + l + sovStructs(uint64(l))
  1037. }
  1038. if m.LocalFlags != 0 {
  1039. n += 2 + sovStructs(uint64(m.LocalFlags))
  1040. }
  1041. l = len(m.VersionHash)
  1042. if l > 0 {
  1043. n += 2 + l + sovStructs(uint64(l))
  1044. }
  1045. return n
  1046. }
  1047. func (m *BlockList) ProtoSize() (n int) {
  1048. if m == nil {
  1049. return 0
  1050. }
  1051. var l int
  1052. _ = l
  1053. if len(m.Blocks) > 0 {
  1054. for _, e := range m.Blocks {
  1055. l = e.ProtoSize()
  1056. n += 1 + l + sovStructs(uint64(l))
  1057. }
  1058. }
  1059. return n
  1060. }
  1061. func (m *IndirectionHashesOnly) ProtoSize() (n int) {
  1062. if m == nil {
  1063. return 0
  1064. }
  1065. var l int
  1066. _ = l
  1067. l = len(m.BlocksHash)
  1068. if l > 0 {
  1069. n += 2 + l + sovStructs(uint64(l))
  1070. }
  1071. l = len(m.VersionHash)
  1072. if l > 0 {
  1073. n += 2 + l + sovStructs(uint64(l))
  1074. }
  1075. return n
  1076. }
  1077. func (m *Counts) ProtoSize() (n int) {
  1078. if m == nil {
  1079. return 0
  1080. }
  1081. var l int
  1082. _ = l
  1083. if m.Files != 0 {
  1084. n += 1 + sovStructs(uint64(m.Files))
  1085. }
  1086. if m.Directories != 0 {
  1087. n += 1 + sovStructs(uint64(m.Directories))
  1088. }
  1089. if m.Symlinks != 0 {
  1090. n += 1 + sovStructs(uint64(m.Symlinks))
  1091. }
  1092. if m.Deleted != 0 {
  1093. n += 1 + sovStructs(uint64(m.Deleted))
  1094. }
  1095. if m.Bytes != 0 {
  1096. n += 1 + sovStructs(uint64(m.Bytes))
  1097. }
  1098. if m.Sequence != 0 {
  1099. n += 1 + sovStructs(uint64(m.Sequence))
  1100. }
  1101. l = len(m.DeviceID)
  1102. if l > 0 {
  1103. n += 2 + l + sovStructs(uint64(l))
  1104. }
  1105. if m.LocalFlags != 0 {
  1106. n += 2 + sovStructs(uint64(m.LocalFlags))
  1107. }
  1108. return n
  1109. }
  1110. func (m *CountsSet) ProtoSize() (n int) {
  1111. if m == nil {
  1112. return 0
  1113. }
  1114. var l int
  1115. _ = l
  1116. if len(m.Counts) > 0 {
  1117. for _, e := range m.Counts {
  1118. l = e.ProtoSize()
  1119. n += 1 + l + sovStructs(uint64(l))
  1120. }
  1121. }
  1122. if m.Created != 0 {
  1123. n += 1 + sovStructs(uint64(m.Created))
  1124. }
  1125. return n
  1126. }
  1127. func (m *FileVersionDeprecated) ProtoSize() (n int) {
  1128. if m == nil {
  1129. return 0
  1130. }
  1131. var l int
  1132. _ = l
  1133. l = m.Version.ProtoSize()
  1134. n += 1 + l + sovStructs(uint64(l))
  1135. l = len(m.Device)
  1136. if l > 0 {
  1137. n += 1 + l + sovStructs(uint64(l))
  1138. }
  1139. if m.Invalid {
  1140. n += 2
  1141. }
  1142. if m.Deleted {
  1143. n += 2
  1144. }
  1145. return n
  1146. }
  1147. func (m *VersionListDeprecated) ProtoSize() (n int) {
  1148. if m == nil {
  1149. return 0
  1150. }
  1151. var l int
  1152. _ = l
  1153. if len(m.Versions) > 0 {
  1154. for _, e := range m.Versions {
  1155. l = e.ProtoSize()
  1156. n += 1 + l + sovStructs(uint64(l))
  1157. }
  1158. }
  1159. return n
  1160. }
  1161. func sovStructs(x uint64) (n int) {
  1162. return (math_bits.Len64(x|1) + 6) / 7
  1163. }
  1164. func sozStructs(x uint64) (n int) {
  1165. return sovStructs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1166. }
  1167. func (m *FileVersion) Unmarshal(dAtA []byte) error {
  1168. l := len(dAtA)
  1169. iNdEx := 0
  1170. for iNdEx < l {
  1171. preIndex := iNdEx
  1172. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  1183. if b < 0x80 {
  1184. break
  1185. }
  1186. }
  1187. fieldNum := int32(wire >> 3)
  1188. wireType := int(wire & 0x7)
  1189. if wireType == 4 {
  1190. return fmt.Errorf("proto: FileVersion: wiretype end group for non-group")
  1191. }
  1192. if fieldNum <= 0 {
  1193. return fmt.Errorf("proto: FileVersion: illegal tag %d (wire type %d)", fieldNum, wire)
  1194. }
  1195. switch fieldNum {
  1196. case 1:
  1197. if wireType != 2 {
  1198. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1199. }
  1200. var msglen int
  1201. for shift := uint(0); ; shift += 7 {
  1202. if shift >= 64 {
  1203. return ErrIntOverflowStructs
  1204. }
  1205. if iNdEx >= l {
  1206. return io.ErrUnexpectedEOF
  1207. }
  1208. b := dAtA[iNdEx]
  1209. iNdEx++
  1210. msglen |= int(b&0x7F) << shift
  1211. if b < 0x80 {
  1212. break
  1213. }
  1214. }
  1215. if msglen < 0 {
  1216. return ErrInvalidLengthStructs
  1217. }
  1218. postIndex := iNdEx + msglen
  1219. if postIndex < 0 {
  1220. return ErrInvalidLengthStructs
  1221. }
  1222. if postIndex > l {
  1223. return io.ErrUnexpectedEOF
  1224. }
  1225. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1226. return err
  1227. }
  1228. iNdEx = postIndex
  1229. case 2:
  1230. if wireType != 0 {
  1231. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1232. }
  1233. var v int
  1234. for shift := uint(0); ; shift += 7 {
  1235. if shift >= 64 {
  1236. return ErrIntOverflowStructs
  1237. }
  1238. if iNdEx >= l {
  1239. return io.ErrUnexpectedEOF
  1240. }
  1241. b := dAtA[iNdEx]
  1242. iNdEx++
  1243. v |= int(b&0x7F) << shift
  1244. if b < 0x80 {
  1245. break
  1246. }
  1247. }
  1248. m.Deleted = bool(v != 0)
  1249. case 3:
  1250. if wireType != 2 {
  1251. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  1252. }
  1253. var byteLen int
  1254. for shift := uint(0); ; shift += 7 {
  1255. if shift >= 64 {
  1256. return ErrIntOverflowStructs
  1257. }
  1258. if iNdEx >= l {
  1259. return io.ErrUnexpectedEOF
  1260. }
  1261. b := dAtA[iNdEx]
  1262. iNdEx++
  1263. byteLen |= int(b&0x7F) << shift
  1264. if b < 0x80 {
  1265. break
  1266. }
  1267. }
  1268. if byteLen < 0 {
  1269. return ErrInvalidLengthStructs
  1270. }
  1271. postIndex := iNdEx + byteLen
  1272. if postIndex < 0 {
  1273. return ErrInvalidLengthStructs
  1274. }
  1275. if postIndex > l {
  1276. return io.ErrUnexpectedEOF
  1277. }
  1278. m.Devices = append(m.Devices, make([]byte, postIndex-iNdEx))
  1279. copy(m.Devices[len(m.Devices)-1], dAtA[iNdEx:postIndex])
  1280. iNdEx = postIndex
  1281. case 4:
  1282. if wireType != 2 {
  1283. return fmt.Errorf("proto: wrong wireType = %d for field InvalidDevices", wireType)
  1284. }
  1285. var byteLen int
  1286. for shift := uint(0); ; shift += 7 {
  1287. if shift >= 64 {
  1288. return ErrIntOverflowStructs
  1289. }
  1290. if iNdEx >= l {
  1291. return io.ErrUnexpectedEOF
  1292. }
  1293. b := dAtA[iNdEx]
  1294. iNdEx++
  1295. byteLen |= int(b&0x7F) << shift
  1296. if b < 0x80 {
  1297. break
  1298. }
  1299. }
  1300. if byteLen < 0 {
  1301. return ErrInvalidLengthStructs
  1302. }
  1303. postIndex := iNdEx + byteLen
  1304. if postIndex < 0 {
  1305. return ErrInvalidLengthStructs
  1306. }
  1307. if postIndex > l {
  1308. return io.ErrUnexpectedEOF
  1309. }
  1310. m.InvalidDevices = append(m.InvalidDevices, make([]byte, postIndex-iNdEx))
  1311. copy(m.InvalidDevices[len(m.InvalidDevices)-1], dAtA[iNdEx:postIndex])
  1312. iNdEx = postIndex
  1313. default:
  1314. iNdEx = preIndex
  1315. skippy, err := skipStructs(dAtA[iNdEx:])
  1316. if err != nil {
  1317. return err
  1318. }
  1319. if skippy < 0 {
  1320. return ErrInvalidLengthStructs
  1321. }
  1322. if (iNdEx + skippy) < 0 {
  1323. return ErrInvalidLengthStructs
  1324. }
  1325. if (iNdEx + skippy) > l {
  1326. return io.ErrUnexpectedEOF
  1327. }
  1328. iNdEx += skippy
  1329. }
  1330. }
  1331. if iNdEx > l {
  1332. return io.ErrUnexpectedEOF
  1333. }
  1334. return nil
  1335. }
  1336. func (m *VersionList) Unmarshal(dAtA []byte) error {
  1337. l := len(dAtA)
  1338. iNdEx := 0
  1339. for iNdEx < l {
  1340. preIndex := iNdEx
  1341. var wire uint64
  1342. for shift := uint(0); ; shift += 7 {
  1343. if shift >= 64 {
  1344. return ErrIntOverflowStructs
  1345. }
  1346. if iNdEx >= l {
  1347. return io.ErrUnexpectedEOF
  1348. }
  1349. b := dAtA[iNdEx]
  1350. iNdEx++
  1351. wire |= uint64(b&0x7F) << shift
  1352. if b < 0x80 {
  1353. break
  1354. }
  1355. }
  1356. fieldNum := int32(wire >> 3)
  1357. wireType := int(wire & 0x7)
  1358. if wireType == 4 {
  1359. return fmt.Errorf("proto: VersionList: wiretype end group for non-group")
  1360. }
  1361. if fieldNum <= 0 {
  1362. return fmt.Errorf("proto: VersionList: illegal tag %d (wire type %d)", fieldNum, wire)
  1363. }
  1364. switch fieldNum {
  1365. case 1:
  1366. if wireType != 2 {
  1367. return fmt.Errorf("proto: wrong wireType = %d for field RawVersions", wireType)
  1368. }
  1369. var msglen int
  1370. for shift := uint(0); ; shift += 7 {
  1371. if shift >= 64 {
  1372. return ErrIntOverflowStructs
  1373. }
  1374. if iNdEx >= l {
  1375. return io.ErrUnexpectedEOF
  1376. }
  1377. b := dAtA[iNdEx]
  1378. iNdEx++
  1379. msglen |= int(b&0x7F) << shift
  1380. if b < 0x80 {
  1381. break
  1382. }
  1383. }
  1384. if msglen < 0 {
  1385. return ErrInvalidLengthStructs
  1386. }
  1387. postIndex := iNdEx + msglen
  1388. if postIndex < 0 {
  1389. return ErrInvalidLengthStructs
  1390. }
  1391. if postIndex > l {
  1392. return io.ErrUnexpectedEOF
  1393. }
  1394. m.RawVersions = append(m.RawVersions, FileVersion{})
  1395. if err := m.RawVersions[len(m.RawVersions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1396. return err
  1397. }
  1398. iNdEx = postIndex
  1399. default:
  1400. iNdEx = preIndex
  1401. skippy, err := skipStructs(dAtA[iNdEx:])
  1402. if err != nil {
  1403. return err
  1404. }
  1405. if skippy < 0 {
  1406. return ErrInvalidLengthStructs
  1407. }
  1408. if (iNdEx + skippy) < 0 {
  1409. return ErrInvalidLengthStructs
  1410. }
  1411. if (iNdEx + skippy) > l {
  1412. return io.ErrUnexpectedEOF
  1413. }
  1414. iNdEx += skippy
  1415. }
  1416. }
  1417. if iNdEx > l {
  1418. return io.ErrUnexpectedEOF
  1419. }
  1420. return nil
  1421. }
  1422. func (m *FileInfoTruncated) Unmarshal(dAtA []byte) error {
  1423. l := len(dAtA)
  1424. iNdEx := 0
  1425. for iNdEx < l {
  1426. preIndex := iNdEx
  1427. var wire uint64
  1428. for shift := uint(0); ; shift += 7 {
  1429. if shift >= 64 {
  1430. return ErrIntOverflowStructs
  1431. }
  1432. if iNdEx >= l {
  1433. return io.ErrUnexpectedEOF
  1434. }
  1435. b := dAtA[iNdEx]
  1436. iNdEx++
  1437. wire |= uint64(b&0x7F) << shift
  1438. if b < 0x80 {
  1439. break
  1440. }
  1441. }
  1442. fieldNum := int32(wire >> 3)
  1443. wireType := int(wire & 0x7)
  1444. if wireType == 4 {
  1445. return fmt.Errorf("proto: FileInfoTruncated: wiretype end group for non-group")
  1446. }
  1447. if fieldNum <= 0 {
  1448. return fmt.Errorf("proto: FileInfoTruncated: illegal tag %d (wire type %d)", fieldNum, wire)
  1449. }
  1450. switch fieldNum {
  1451. case 1:
  1452. if wireType != 2 {
  1453. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1454. }
  1455. var stringLen uint64
  1456. for shift := uint(0); ; shift += 7 {
  1457. if shift >= 64 {
  1458. return ErrIntOverflowStructs
  1459. }
  1460. if iNdEx >= l {
  1461. return io.ErrUnexpectedEOF
  1462. }
  1463. b := dAtA[iNdEx]
  1464. iNdEx++
  1465. stringLen |= uint64(b&0x7F) << shift
  1466. if b < 0x80 {
  1467. break
  1468. }
  1469. }
  1470. intStringLen := int(stringLen)
  1471. if intStringLen < 0 {
  1472. return ErrInvalidLengthStructs
  1473. }
  1474. postIndex := iNdEx + intStringLen
  1475. if postIndex < 0 {
  1476. return ErrInvalidLengthStructs
  1477. }
  1478. if postIndex > l {
  1479. return io.ErrUnexpectedEOF
  1480. }
  1481. m.Name = string(dAtA[iNdEx:postIndex])
  1482. iNdEx = postIndex
  1483. case 2:
  1484. if wireType != 0 {
  1485. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1486. }
  1487. m.Type = 0
  1488. for shift := uint(0); ; shift += 7 {
  1489. if shift >= 64 {
  1490. return ErrIntOverflowStructs
  1491. }
  1492. if iNdEx >= l {
  1493. return io.ErrUnexpectedEOF
  1494. }
  1495. b := dAtA[iNdEx]
  1496. iNdEx++
  1497. m.Type |= protocol.FileInfoType(b&0x7F) << shift
  1498. if b < 0x80 {
  1499. break
  1500. }
  1501. }
  1502. case 3:
  1503. if wireType != 0 {
  1504. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  1505. }
  1506. m.Size = 0
  1507. for shift := uint(0); ; shift += 7 {
  1508. if shift >= 64 {
  1509. return ErrIntOverflowStructs
  1510. }
  1511. if iNdEx >= l {
  1512. return io.ErrUnexpectedEOF
  1513. }
  1514. b := dAtA[iNdEx]
  1515. iNdEx++
  1516. m.Size |= int64(b&0x7F) << shift
  1517. if b < 0x80 {
  1518. break
  1519. }
  1520. }
  1521. case 4:
  1522. if wireType != 0 {
  1523. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  1524. }
  1525. m.Permissions = 0
  1526. for shift := uint(0); ; shift += 7 {
  1527. if shift >= 64 {
  1528. return ErrIntOverflowStructs
  1529. }
  1530. if iNdEx >= l {
  1531. return io.ErrUnexpectedEOF
  1532. }
  1533. b := dAtA[iNdEx]
  1534. iNdEx++
  1535. m.Permissions |= uint32(b&0x7F) << shift
  1536. if b < 0x80 {
  1537. break
  1538. }
  1539. }
  1540. case 5:
  1541. if wireType != 0 {
  1542. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  1543. }
  1544. m.ModifiedS = 0
  1545. for shift := uint(0); ; shift += 7 {
  1546. if shift >= 64 {
  1547. return ErrIntOverflowStructs
  1548. }
  1549. if iNdEx >= l {
  1550. return io.ErrUnexpectedEOF
  1551. }
  1552. b := dAtA[iNdEx]
  1553. iNdEx++
  1554. m.ModifiedS |= int64(b&0x7F) << shift
  1555. if b < 0x80 {
  1556. break
  1557. }
  1558. }
  1559. case 6:
  1560. if wireType != 0 {
  1561. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1562. }
  1563. var v int
  1564. for shift := uint(0); ; shift += 7 {
  1565. if shift >= 64 {
  1566. return ErrIntOverflowStructs
  1567. }
  1568. if iNdEx >= l {
  1569. return io.ErrUnexpectedEOF
  1570. }
  1571. b := dAtA[iNdEx]
  1572. iNdEx++
  1573. v |= int(b&0x7F) << shift
  1574. if b < 0x80 {
  1575. break
  1576. }
  1577. }
  1578. m.Deleted = bool(v != 0)
  1579. case 7:
  1580. if wireType != 0 {
  1581. return fmt.Errorf("proto: wrong wireType = %d for field RawInvalid", wireType)
  1582. }
  1583. var v int
  1584. for shift := uint(0); ; shift += 7 {
  1585. if shift >= 64 {
  1586. return ErrIntOverflowStructs
  1587. }
  1588. if iNdEx >= l {
  1589. return io.ErrUnexpectedEOF
  1590. }
  1591. b := dAtA[iNdEx]
  1592. iNdEx++
  1593. v |= int(b&0x7F) << shift
  1594. if b < 0x80 {
  1595. break
  1596. }
  1597. }
  1598. m.RawInvalid = bool(v != 0)
  1599. case 8:
  1600. if wireType != 0 {
  1601. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  1602. }
  1603. var v int
  1604. for shift := uint(0); ; shift += 7 {
  1605. if shift >= 64 {
  1606. return ErrIntOverflowStructs
  1607. }
  1608. if iNdEx >= l {
  1609. return io.ErrUnexpectedEOF
  1610. }
  1611. b := dAtA[iNdEx]
  1612. iNdEx++
  1613. v |= int(b&0x7F) << shift
  1614. if b < 0x80 {
  1615. break
  1616. }
  1617. }
  1618. m.NoPermissions = bool(v != 0)
  1619. case 9:
  1620. if wireType != 2 {
  1621. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1622. }
  1623. var msglen int
  1624. for shift := uint(0); ; shift += 7 {
  1625. if shift >= 64 {
  1626. return ErrIntOverflowStructs
  1627. }
  1628. if iNdEx >= l {
  1629. return io.ErrUnexpectedEOF
  1630. }
  1631. b := dAtA[iNdEx]
  1632. iNdEx++
  1633. msglen |= int(b&0x7F) << shift
  1634. if b < 0x80 {
  1635. break
  1636. }
  1637. }
  1638. if msglen < 0 {
  1639. return ErrInvalidLengthStructs
  1640. }
  1641. postIndex := iNdEx + msglen
  1642. if postIndex < 0 {
  1643. return ErrInvalidLengthStructs
  1644. }
  1645. if postIndex > l {
  1646. return io.ErrUnexpectedEOF
  1647. }
  1648. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1649. return err
  1650. }
  1651. iNdEx = postIndex
  1652. case 10:
  1653. if wireType != 0 {
  1654. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  1655. }
  1656. m.Sequence = 0
  1657. for shift := uint(0); ; shift += 7 {
  1658. if shift >= 64 {
  1659. return ErrIntOverflowStructs
  1660. }
  1661. if iNdEx >= l {
  1662. return io.ErrUnexpectedEOF
  1663. }
  1664. b := dAtA[iNdEx]
  1665. iNdEx++
  1666. m.Sequence |= int64(b&0x7F) << shift
  1667. if b < 0x80 {
  1668. break
  1669. }
  1670. }
  1671. case 11:
  1672. if wireType != 0 {
  1673. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  1674. }
  1675. m.ModifiedNs = 0
  1676. for shift := uint(0); ; shift += 7 {
  1677. if shift >= 64 {
  1678. return ErrIntOverflowStructs
  1679. }
  1680. if iNdEx >= l {
  1681. return io.ErrUnexpectedEOF
  1682. }
  1683. b := dAtA[iNdEx]
  1684. iNdEx++
  1685. m.ModifiedNs |= int32(b&0x7F) << shift
  1686. if b < 0x80 {
  1687. break
  1688. }
  1689. }
  1690. case 12:
  1691. if wireType != 0 {
  1692. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  1693. }
  1694. m.ModifiedBy = 0
  1695. for shift := uint(0); ; shift += 7 {
  1696. if shift >= 64 {
  1697. return ErrIntOverflowStructs
  1698. }
  1699. if iNdEx >= l {
  1700. return io.ErrUnexpectedEOF
  1701. }
  1702. b := dAtA[iNdEx]
  1703. iNdEx++
  1704. m.ModifiedBy |= github_com_syncthing_syncthing_lib_protocol.ShortID(b&0x7F) << shift
  1705. if b < 0x80 {
  1706. break
  1707. }
  1708. }
  1709. case 13:
  1710. if wireType != 0 {
  1711. return fmt.Errorf("proto: wrong wireType = %d for field RawBlockSize", wireType)
  1712. }
  1713. m.RawBlockSize = 0
  1714. for shift := uint(0); ; shift += 7 {
  1715. if shift >= 64 {
  1716. return ErrIntOverflowStructs
  1717. }
  1718. if iNdEx >= l {
  1719. return io.ErrUnexpectedEOF
  1720. }
  1721. b := dAtA[iNdEx]
  1722. iNdEx++
  1723. m.RawBlockSize |= int32(b&0x7F) << shift
  1724. if b < 0x80 {
  1725. break
  1726. }
  1727. }
  1728. case 17:
  1729. if wireType != 2 {
  1730. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  1731. }
  1732. var stringLen uint64
  1733. for shift := uint(0); ; shift += 7 {
  1734. if shift >= 64 {
  1735. return ErrIntOverflowStructs
  1736. }
  1737. if iNdEx >= l {
  1738. return io.ErrUnexpectedEOF
  1739. }
  1740. b := dAtA[iNdEx]
  1741. iNdEx++
  1742. stringLen |= uint64(b&0x7F) << shift
  1743. if b < 0x80 {
  1744. break
  1745. }
  1746. }
  1747. intStringLen := int(stringLen)
  1748. if intStringLen < 0 {
  1749. return ErrInvalidLengthStructs
  1750. }
  1751. postIndex := iNdEx + intStringLen
  1752. if postIndex < 0 {
  1753. return ErrInvalidLengthStructs
  1754. }
  1755. if postIndex > l {
  1756. return io.ErrUnexpectedEOF
  1757. }
  1758. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  1759. iNdEx = postIndex
  1760. case 18:
  1761. if wireType != 2 {
  1762. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  1763. }
  1764. var byteLen int
  1765. for shift := uint(0); ; shift += 7 {
  1766. if shift >= 64 {
  1767. return ErrIntOverflowStructs
  1768. }
  1769. if iNdEx >= l {
  1770. return io.ErrUnexpectedEOF
  1771. }
  1772. b := dAtA[iNdEx]
  1773. iNdEx++
  1774. byteLen |= int(b&0x7F) << shift
  1775. if b < 0x80 {
  1776. break
  1777. }
  1778. }
  1779. if byteLen < 0 {
  1780. return ErrInvalidLengthStructs
  1781. }
  1782. postIndex := iNdEx + byteLen
  1783. if postIndex < 0 {
  1784. return ErrInvalidLengthStructs
  1785. }
  1786. if postIndex > l {
  1787. return io.ErrUnexpectedEOF
  1788. }
  1789. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  1790. if m.BlocksHash == nil {
  1791. m.BlocksHash = []byte{}
  1792. }
  1793. iNdEx = postIndex
  1794. case 1000:
  1795. if wireType != 0 {
  1796. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  1797. }
  1798. m.LocalFlags = 0
  1799. for shift := uint(0); ; shift += 7 {
  1800. if shift >= 64 {
  1801. return ErrIntOverflowStructs
  1802. }
  1803. if iNdEx >= l {
  1804. return io.ErrUnexpectedEOF
  1805. }
  1806. b := dAtA[iNdEx]
  1807. iNdEx++
  1808. m.LocalFlags |= uint32(b&0x7F) << shift
  1809. if b < 0x80 {
  1810. break
  1811. }
  1812. }
  1813. case 1001:
  1814. if wireType != 2 {
  1815. return fmt.Errorf("proto: wrong wireType = %d for field VersionHash", wireType)
  1816. }
  1817. var byteLen int
  1818. for shift := uint(0); ; shift += 7 {
  1819. if shift >= 64 {
  1820. return ErrIntOverflowStructs
  1821. }
  1822. if iNdEx >= l {
  1823. return io.ErrUnexpectedEOF
  1824. }
  1825. b := dAtA[iNdEx]
  1826. iNdEx++
  1827. byteLen |= int(b&0x7F) << shift
  1828. if b < 0x80 {
  1829. break
  1830. }
  1831. }
  1832. if byteLen < 0 {
  1833. return ErrInvalidLengthStructs
  1834. }
  1835. postIndex := iNdEx + byteLen
  1836. if postIndex < 0 {
  1837. return ErrInvalidLengthStructs
  1838. }
  1839. if postIndex > l {
  1840. return io.ErrUnexpectedEOF
  1841. }
  1842. m.VersionHash = append(m.VersionHash[:0], dAtA[iNdEx:postIndex]...)
  1843. if m.VersionHash == nil {
  1844. m.VersionHash = []byte{}
  1845. }
  1846. iNdEx = postIndex
  1847. default:
  1848. iNdEx = preIndex
  1849. skippy, err := skipStructs(dAtA[iNdEx:])
  1850. if err != nil {
  1851. return err
  1852. }
  1853. if skippy < 0 {
  1854. return ErrInvalidLengthStructs
  1855. }
  1856. if (iNdEx + skippy) < 0 {
  1857. return ErrInvalidLengthStructs
  1858. }
  1859. if (iNdEx + skippy) > l {
  1860. return io.ErrUnexpectedEOF
  1861. }
  1862. iNdEx += skippy
  1863. }
  1864. }
  1865. if iNdEx > l {
  1866. return io.ErrUnexpectedEOF
  1867. }
  1868. return nil
  1869. }
  1870. func (m *BlockList) Unmarshal(dAtA []byte) error {
  1871. l := len(dAtA)
  1872. iNdEx := 0
  1873. for iNdEx < l {
  1874. preIndex := iNdEx
  1875. var wire uint64
  1876. for shift := uint(0); ; shift += 7 {
  1877. if shift >= 64 {
  1878. return ErrIntOverflowStructs
  1879. }
  1880. if iNdEx >= l {
  1881. return io.ErrUnexpectedEOF
  1882. }
  1883. b := dAtA[iNdEx]
  1884. iNdEx++
  1885. wire |= uint64(b&0x7F) << shift
  1886. if b < 0x80 {
  1887. break
  1888. }
  1889. }
  1890. fieldNum := int32(wire >> 3)
  1891. wireType := int(wire & 0x7)
  1892. if wireType == 4 {
  1893. return fmt.Errorf("proto: BlockList: wiretype end group for non-group")
  1894. }
  1895. if fieldNum <= 0 {
  1896. return fmt.Errorf("proto: BlockList: illegal tag %d (wire type %d)", fieldNum, wire)
  1897. }
  1898. switch fieldNum {
  1899. case 1:
  1900. if wireType != 2 {
  1901. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  1902. }
  1903. var msglen int
  1904. for shift := uint(0); ; shift += 7 {
  1905. if shift >= 64 {
  1906. return ErrIntOverflowStructs
  1907. }
  1908. if iNdEx >= l {
  1909. return io.ErrUnexpectedEOF
  1910. }
  1911. b := dAtA[iNdEx]
  1912. iNdEx++
  1913. msglen |= int(b&0x7F) << shift
  1914. if b < 0x80 {
  1915. break
  1916. }
  1917. }
  1918. if msglen < 0 {
  1919. return ErrInvalidLengthStructs
  1920. }
  1921. postIndex := iNdEx + msglen
  1922. if postIndex < 0 {
  1923. return ErrInvalidLengthStructs
  1924. }
  1925. if postIndex > l {
  1926. return io.ErrUnexpectedEOF
  1927. }
  1928. m.Blocks = append(m.Blocks, protocol.BlockInfo{})
  1929. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1930. return err
  1931. }
  1932. iNdEx = postIndex
  1933. default:
  1934. iNdEx = preIndex
  1935. skippy, err := skipStructs(dAtA[iNdEx:])
  1936. if err != nil {
  1937. return err
  1938. }
  1939. if skippy < 0 {
  1940. return ErrInvalidLengthStructs
  1941. }
  1942. if (iNdEx + skippy) < 0 {
  1943. return ErrInvalidLengthStructs
  1944. }
  1945. if (iNdEx + skippy) > l {
  1946. return io.ErrUnexpectedEOF
  1947. }
  1948. iNdEx += skippy
  1949. }
  1950. }
  1951. if iNdEx > l {
  1952. return io.ErrUnexpectedEOF
  1953. }
  1954. return nil
  1955. }
  1956. func (m *IndirectionHashesOnly) Unmarshal(dAtA []byte) error {
  1957. l := len(dAtA)
  1958. iNdEx := 0
  1959. for iNdEx < l {
  1960. preIndex := iNdEx
  1961. var wire uint64
  1962. for shift := uint(0); ; shift += 7 {
  1963. if shift >= 64 {
  1964. return ErrIntOverflowStructs
  1965. }
  1966. if iNdEx >= l {
  1967. return io.ErrUnexpectedEOF
  1968. }
  1969. b := dAtA[iNdEx]
  1970. iNdEx++
  1971. wire |= uint64(b&0x7F) << shift
  1972. if b < 0x80 {
  1973. break
  1974. }
  1975. }
  1976. fieldNum := int32(wire >> 3)
  1977. wireType := int(wire & 0x7)
  1978. if wireType == 4 {
  1979. return fmt.Errorf("proto: IndirectionHashesOnly: wiretype end group for non-group")
  1980. }
  1981. if fieldNum <= 0 {
  1982. return fmt.Errorf("proto: IndirectionHashesOnly: illegal tag %d (wire type %d)", fieldNum, wire)
  1983. }
  1984. switch fieldNum {
  1985. case 18:
  1986. if wireType != 2 {
  1987. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  1988. }
  1989. var byteLen int
  1990. for shift := uint(0); ; shift += 7 {
  1991. if shift >= 64 {
  1992. return ErrIntOverflowStructs
  1993. }
  1994. if iNdEx >= l {
  1995. return io.ErrUnexpectedEOF
  1996. }
  1997. b := dAtA[iNdEx]
  1998. iNdEx++
  1999. byteLen |= int(b&0x7F) << shift
  2000. if b < 0x80 {
  2001. break
  2002. }
  2003. }
  2004. if byteLen < 0 {
  2005. return ErrInvalidLengthStructs
  2006. }
  2007. postIndex := iNdEx + byteLen
  2008. if postIndex < 0 {
  2009. return ErrInvalidLengthStructs
  2010. }
  2011. if postIndex > l {
  2012. return io.ErrUnexpectedEOF
  2013. }
  2014. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  2015. if m.BlocksHash == nil {
  2016. m.BlocksHash = []byte{}
  2017. }
  2018. iNdEx = postIndex
  2019. case 1001:
  2020. if wireType != 2 {
  2021. return fmt.Errorf("proto: wrong wireType = %d for field VersionHash", wireType)
  2022. }
  2023. var byteLen int
  2024. for shift := uint(0); ; shift += 7 {
  2025. if shift >= 64 {
  2026. return ErrIntOverflowStructs
  2027. }
  2028. if iNdEx >= l {
  2029. return io.ErrUnexpectedEOF
  2030. }
  2031. b := dAtA[iNdEx]
  2032. iNdEx++
  2033. byteLen |= int(b&0x7F) << shift
  2034. if b < 0x80 {
  2035. break
  2036. }
  2037. }
  2038. if byteLen < 0 {
  2039. return ErrInvalidLengthStructs
  2040. }
  2041. postIndex := iNdEx + byteLen
  2042. if postIndex < 0 {
  2043. return ErrInvalidLengthStructs
  2044. }
  2045. if postIndex > l {
  2046. return io.ErrUnexpectedEOF
  2047. }
  2048. m.VersionHash = append(m.VersionHash[:0], dAtA[iNdEx:postIndex]...)
  2049. if m.VersionHash == nil {
  2050. m.VersionHash = []byte{}
  2051. }
  2052. iNdEx = postIndex
  2053. default:
  2054. iNdEx = preIndex
  2055. skippy, err := skipStructs(dAtA[iNdEx:])
  2056. if err != nil {
  2057. return err
  2058. }
  2059. if skippy < 0 {
  2060. return ErrInvalidLengthStructs
  2061. }
  2062. if (iNdEx + skippy) < 0 {
  2063. return ErrInvalidLengthStructs
  2064. }
  2065. if (iNdEx + skippy) > l {
  2066. return io.ErrUnexpectedEOF
  2067. }
  2068. iNdEx += skippy
  2069. }
  2070. }
  2071. if iNdEx > l {
  2072. return io.ErrUnexpectedEOF
  2073. }
  2074. return nil
  2075. }
  2076. func (m *Counts) Unmarshal(dAtA []byte) error {
  2077. l := len(dAtA)
  2078. iNdEx := 0
  2079. for iNdEx < l {
  2080. preIndex := iNdEx
  2081. var wire uint64
  2082. for shift := uint(0); ; shift += 7 {
  2083. if shift >= 64 {
  2084. return ErrIntOverflowStructs
  2085. }
  2086. if iNdEx >= l {
  2087. return io.ErrUnexpectedEOF
  2088. }
  2089. b := dAtA[iNdEx]
  2090. iNdEx++
  2091. wire |= uint64(b&0x7F) << shift
  2092. if b < 0x80 {
  2093. break
  2094. }
  2095. }
  2096. fieldNum := int32(wire >> 3)
  2097. wireType := int(wire & 0x7)
  2098. if wireType == 4 {
  2099. return fmt.Errorf("proto: Counts: wiretype end group for non-group")
  2100. }
  2101. if fieldNum <= 0 {
  2102. return fmt.Errorf("proto: Counts: illegal tag %d (wire type %d)", fieldNum, wire)
  2103. }
  2104. switch fieldNum {
  2105. case 1:
  2106. if wireType != 0 {
  2107. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  2108. }
  2109. m.Files = 0
  2110. for shift := uint(0); ; shift += 7 {
  2111. if shift >= 64 {
  2112. return ErrIntOverflowStructs
  2113. }
  2114. if iNdEx >= l {
  2115. return io.ErrUnexpectedEOF
  2116. }
  2117. b := dAtA[iNdEx]
  2118. iNdEx++
  2119. m.Files |= int32(b&0x7F) << shift
  2120. if b < 0x80 {
  2121. break
  2122. }
  2123. }
  2124. case 2:
  2125. if wireType != 0 {
  2126. return fmt.Errorf("proto: wrong wireType = %d for field Directories", wireType)
  2127. }
  2128. m.Directories = 0
  2129. for shift := uint(0); ; shift += 7 {
  2130. if shift >= 64 {
  2131. return ErrIntOverflowStructs
  2132. }
  2133. if iNdEx >= l {
  2134. return io.ErrUnexpectedEOF
  2135. }
  2136. b := dAtA[iNdEx]
  2137. iNdEx++
  2138. m.Directories |= int32(b&0x7F) << shift
  2139. if b < 0x80 {
  2140. break
  2141. }
  2142. }
  2143. case 3:
  2144. if wireType != 0 {
  2145. return fmt.Errorf("proto: wrong wireType = %d for field Symlinks", wireType)
  2146. }
  2147. m.Symlinks = 0
  2148. for shift := uint(0); ; shift += 7 {
  2149. if shift >= 64 {
  2150. return ErrIntOverflowStructs
  2151. }
  2152. if iNdEx >= l {
  2153. return io.ErrUnexpectedEOF
  2154. }
  2155. b := dAtA[iNdEx]
  2156. iNdEx++
  2157. m.Symlinks |= int32(b&0x7F) << shift
  2158. if b < 0x80 {
  2159. break
  2160. }
  2161. }
  2162. case 4:
  2163. if wireType != 0 {
  2164. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  2165. }
  2166. m.Deleted = 0
  2167. for shift := uint(0); ; shift += 7 {
  2168. if shift >= 64 {
  2169. return ErrIntOverflowStructs
  2170. }
  2171. if iNdEx >= l {
  2172. return io.ErrUnexpectedEOF
  2173. }
  2174. b := dAtA[iNdEx]
  2175. iNdEx++
  2176. m.Deleted |= int32(b&0x7F) << shift
  2177. if b < 0x80 {
  2178. break
  2179. }
  2180. }
  2181. case 5:
  2182. if wireType != 0 {
  2183. return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
  2184. }
  2185. m.Bytes = 0
  2186. for shift := uint(0); ; shift += 7 {
  2187. if shift >= 64 {
  2188. return ErrIntOverflowStructs
  2189. }
  2190. if iNdEx >= l {
  2191. return io.ErrUnexpectedEOF
  2192. }
  2193. b := dAtA[iNdEx]
  2194. iNdEx++
  2195. m.Bytes |= int64(b&0x7F) << shift
  2196. if b < 0x80 {
  2197. break
  2198. }
  2199. }
  2200. case 6:
  2201. if wireType != 0 {
  2202. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  2203. }
  2204. m.Sequence = 0
  2205. for shift := uint(0); ; shift += 7 {
  2206. if shift >= 64 {
  2207. return ErrIntOverflowStructs
  2208. }
  2209. if iNdEx >= l {
  2210. return io.ErrUnexpectedEOF
  2211. }
  2212. b := dAtA[iNdEx]
  2213. iNdEx++
  2214. m.Sequence |= int64(b&0x7F) << shift
  2215. if b < 0x80 {
  2216. break
  2217. }
  2218. }
  2219. case 17:
  2220. if wireType != 2 {
  2221. return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
  2222. }
  2223. var byteLen int
  2224. for shift := uint(0); ; shift += 7 {
  2225. if shift >= 64 {
  2226. return ErrIntOverflowStructs
  2227. }
  2228. if iNdEx >= l {
  2229. return io.ErrUnexpectedEOF
  2230. }
  2231. b := dAtA[iNdEx]
  2232. iNdEx++
  2233. byteLen |= int(b&0x7F) << shift
  2234. if b < 0x80 {
  2235. break
  2236. }
  2237. }
  2238. if byteLen < 0 {
  2239. return ErrInvalidLengthStructs
  2240. }
  2241. postIndex := iNdEx + byteLen
  2242. if postIndex < 0 {
  2243. return ErrInvalidLengthStructs
  2244. }
  2245. if postIndex > l {
  2246. return io.ErrUnexpectedEOF
  2247. }
  2248. m.DeviceID = append(m.DeviceID[:0], dAtA[iNdEx:postIndex]...)
  2249. if m.DeviceID == nil {
  2250. m.DeviceID = []byte{}
  2251. }
  2252. iNdEx = postIndex
  2253. case 18:
  2254. if wireType != 0 {
  2255. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  2256. }
  2257. m.LocalFlags = 0
  2258. for shift := uint(0); ; shift += 7 {
  2259. if shift >= 64 {
  2260. return ErrIntOverflowStructs
  2261. }
  2262. if iNdEx >= l {
  2263. return io.ErrUnexpectedEOF
  2264. }
  2265. b := dAtA[iNdEx]
  2266. iNdEx++
  2267. m.LocalFlags |= uint32(b&0x7F) << shift
  2268. if b < 0x80 {
  2269. break
  2270. }
  2271. }
  2272. default:
  2273. iNdEx = preIndex
  2274. skippy, err := skipStructs(dAtA[iNdEx:])
  2275. if err != nil {
  2276. return err
  2277. }
  2278. if skippy < 0 {
  2279. return ErrInvalidLengthStructs
  2280. }
  2281. if (iNdEx + skippy) < 0 {
  2282. return ErrInvalidLengthStructs
  2283. }
  2284. if (iNdEx + skippy) > l {
  2285. return io.ErrUnexpectedEOF
  2286. }
  2287. iNdEx += skippy
  2288. }
  2289. }
  2290. if iNdEx > l {
  2291. return io.ErrUnexpectedEOF
  2292. }
  2293. return nil
  2294. }
  2295. func (m *CountsSet) Unmarshal(dAtA []byte) error {
  2296. l := len(dAtA)
  2297. iNdEx := 0
  2298. for iNdEx < l {
  2299. preIndex := iNdEx
  2300. var wire uint64
  2301. for shift := uint(0); ; shift += 7 {
  2302. if shift >= 64 {
  2303. return ErrIntOverflowStructs
  2304. }
  2305. if iNdEx >= l {
  2306. return io.ErrUnexpectedEOF
  2307. }
  2308. b := dAtA[iNdEx]
  2309. iNdEx++
  2310. wire |= uint64(b&0x7F) << shift
  2311. if b < 0x80 {
  2312. break
  2313. }
  2314. }
  2315. fieldNum := int32(wire >> 3)
  2316. wireType := int(wire & 0x7)
  2317. if wireType == 4 {
  2318. return fmt.Errorf("proto: CountsSet: wiretype end group for non-group")
  2319. }
  2320. if fieldNum <= 0 {
  2321. return fmt.Errorf("proto: CountsSet: illegal tag %d (wire type %d)", fieldNum, wire)
  2322. }
  2323. switch fieldNum {
  2324. case 1:
  2325. if wireType != 2 {
  2326. return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType)
  2327. }
  2328. var msglen int
  2329. for shift := uint(0); ; shift += 7 {
  2330. if shift >= 64 {
  2331. return ErrIntOverflowStructs
  2332. }
  2333. if iNdEx >= l {
  2334. return io.ErrUnexpectedEOF
  2335. }
  2336. b := dAtA[iNdEx]
  2337. iNdEx++
  2338. msglen |= int(b&0x7F) << shift
  2339. if b < 0x80 {
  2340. break
  2341. }
  2342. }
  2343. if msglen < 0 {
  2344. return ErrInvalidLengthStructs
  2345. }
  2346. postIndex := iNdEx + msglen
  2347. if postIndex < 0 {
  2348. return ErrInvalidLengthStructs
  2349. }
  2350. if postIndex > l {
  2351. return io.ErrUnexpectedEOF
  2352. }
  2353. m.Counts = append(m.Counts, Counts{})
  2354. if err := m.Counts[len(m.Counts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2355. return err
  2356. }
  2357. iNdEx = postIndex
  2358. case 2:
  2359. if wireType != 0 {
  2360. return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
  2361. }
  2362. m.Created = 0
  2363. for shift := uint(0); ; shift += 7 {
  2364. if shift >= 64 {
  2365. return ErrIntOverflowStructs
  2366. }
  2367. if iNdEx >= l {
  2368. return io.ErrUnexpectedEOF
  2369. }
  2370. b := dAtA[iNdEx]
  2371. iNdEx++
  2372. m.Created |= int64(b&0x7F) << shift
  2373. if b < 0x80 {
  2374. break
  2375. }
  2376. }
  2377. default:
  2378. iNdEx = preIndex
  2379. skippy, err := skipStructs(dAtA[iNdEx:])
  2380. if err != nil {
  2381. return err
  2382. }
  2383. if skippy < 0 {
  2384. return ErrInvalidLengthStructs
  2385. }
  2386. if (iNdEx + skippy) < 0 {
  2387. return ErrInvalidLengthStructs
  2388. }
  2389. if (iNdEx + skippy) > l {
  2390. return io.ErrUnexpectedEOF
  2391. }
  2392. iNdEx += skippy
  2393. }
  2394. }
  2395. if iNdEx > l {
  2396. return io.ErrUnexpectedEOF
  2397. }
  2398. return nil
  2399. }
  2400. func (m *FileVersionDeprecated) Unmarshal(dAtA []byte) error {
  2401. l := len(dAtA)
  2402. iNdEx := 0
  2403. for iNdEx < l {
  2404. preIndex := iNdEx
  2405. var wire uint64
  2406. for shift := uint(0); ; shift += 7 {
  2407. if shift >= 64 {
  2408. return ErrIntOverflowStructs
  2409. }
  2410. if iNdEx >= l {
  2411. return io.ErrUnexpectedEOF
  2412. }
  2413. b := dAtA[iNdEx]
  2414. iNdEx++
  2415. wire |= uint64(b&0x7F) << shift
  2416. if b < 0x80 {
  2417. break
  2418. }
  2419. }
  2420. fieldNum := int32(wire >> 3)
  2421. wireType := int(wire & 0x7)
  2422. if wireType == 4 {
  2423. return fmt.Errorf("proto: FileVersionDeprecated: wiretype end group for non-group")
  2424. }
  2425. if fieldNum <= 0 {
  2426. return fmt.Errorf("proto: FileVersionDeprecated: illegal tag %d (wire type %d)", fieldNum, wire)
  2427. }
  2428. switch fieldNum {
  2429. case 1:
  2430. if wireType != 2 {
  2431. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  2432. }
  2433. var msglen int
  2434. for shift := uint(0); ; shift += 7 {
  2435. if shift >= 64 {
  2436. return ErrIntOverflowStructs
  2437. }
  2438. if iNdEx >= l {
  2439. return io.ErrUnexpectedEOF
  2440. }
  2441. b := dAtA[iNdEx]
  2442. iNdEx++
  2443. msglen |= int(b&0x7F) << shift
  2444. if b < 0x80 {
  2445. break
  2446. }
  2447. }
  2448. if msglen < 0 {
  2449. return ErrInvalidLengthStructs
  2450. }
  2451. postIndex := iNdEx + msglen
  2452. if postIndex < 0 {
  2453. return ErrInvalidLengthStructs
  2454. }
  2455. if postIndex > l {
  2456. return io.ErrUnexpectedEOF
  2457. }
  2458. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2459. return err
  2460. }
  2461. iNdEx = postIndex
  2462. case 2:
  2463. if wireType != 2 {
  2464. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  2465. }
  2466. var byteLen int
  2467. for shift := uint(0); ; shift += 7 {
  2468. if shift >= 64 {
  2469. return ErrIntOverflowStructs
  2470. }
  2471. if iNdEx >= l {
  2472. return io.ErrUnexpectedEOF
  2473. }
  2474. b := dAtA[iNdEx]
  2475. iNdEx++
  2476. byteLen |= int(b&0x7F) << shift
  2477. if b < 0x80 {
  2478. break
  2479. }
  2480. }
  2481. if byteLen < 0 {
  2482. return ErrInvalidLengthStructs
  2483. }
  2484. postIndex := iNdEx + byteLen
  2485. if postIndex < 0 {
  2486. return ErrInvalidLengthStructs
  2487. }
  2488. if postIndex > l {
  2489. return io.ErrUnexpectedEOF
  2490. }
  2491. m.Device = append(m.Device[:0], dAtA[iNdEx:postIndex]...)
  2492. if m.Device == nil {
  2493. m.Device = []byte{}
  2494. }
  2495. iNdEx = postIndex
  2496. case 3:
  2497. if wireType != 0 {
  2498. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  2499. }
  2500. var v int
  2501. for shift := uint(0); ; shift += 7 {
  2502. if shift >= 64 {
  2503. return ErrIntOverflowStructs
  2504. }
  2505. if iNdEx >= l {
  2506. return io.ErrUnexpectedEOF
  2507. }
  2508. b := dAtA[iNdEx]
  2509. iNdEx++
  2510. v |= int(b&0x7F) << shift
  2511. if b < 0x80 {
  2512. break
  2513. }
  2514. }
  2515. m.Invalid = bool(v != 0)
  2516. case 4:
  2517. if wireType != 0 {
  2518. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  2519. }
  2520. var v int
  2521. for shift := uint(0); ; shift += 7 {
  2522. if shift >= 64 {
  2523. return ErrIntOverflowStructs
  2524. }
  2525. if iNdEx >= l {
  2526. return io.ErrUnexpectedEOF
  2527. }
  2528. b := dAtA[iNdEx]
  2529. iNdEx++
  2530. v |= int(b&0x7F) << shift
  2531. if b < 0x80 {
  2532. break
  2533. }
  2534. }
  2535. m.Deleted = bool(v != 0)
  2536. default:
  2537. iNdEx = preIndex
  2538. skippy, err := skipStructs(dAtA[iNdEx:])
  2539. if err != nil {
  2540. return err
  2541. }
  2542. if skippy < 0 {
  2543. return ErrInvalidLengthStructs
  2544. }
  2545. if (iNdEx + skippy) < 0 {
  2546. return ErrInvalidLengthStructs
  2547. }
  2548. if (iNdEx + skippy) > l {
  2549. return io.ErrUnexpectedEOF
  2550. }
  2551. iNdEx += skippy
  2552. }
  2553. }
  2554. if iNdEx > l {
  2555. return io.ErrUnexpectedEOF
  2556. }
  2557. return nil
  2558. }
  2559. func (m *VersionListDeprecated) Unmarshal(dAtA []byte) error {
  2560. l := len(dAtA)
  2561. iNdEx := 0
  2562. for iNdEx < l {
  2563. preIndex := iNdEx
  2564. var wire uint64
  2565. for shift := uint(0); ; shift += 7 {
  2566. if shift >= 64 {
  2567. return ErrIntOverflowStructs
  2568. }
  2569. if iNdEx >= l {
  2570. return io.ErrUnexpectedEOF
  2571. }
  2572. b := dAtA[iNdEx]
  2573. iNdEx++
  2574. wire |= uint64(b&0x7F) << shift
  2575. if b < 0x80 {
  2576. break
  2577. }
  2578. }
  2579. fieldNum := int32(wire >> 3)
  2580. wireType := int(wire & 0x7)
  2581. if wireType == 4 {
  2582. return fmt.Errorf("proto: VersionListDeprecated: wiretype end group for non-group")
  2583. }
  2584. if fieldNum <= 0 {
  2585. return fmt.Errorf("proto: VersionListDeprecated: illegal tag %d (wire type %d)", fieldNum, wire)
  2586. }
  2587. switch fieldNum {
  2588. case 1:
  2589. if wireType != 2 {
  2590. return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
  2591. }
  2592. var msglen int
  2593. for shift := uint(0); ; shift += 7 {
  2594. if shift >= 64 {
  2595. return ErrIntOverflowStructs
  2596. }
  2597. if iNdEx >= l {
  2598. return io.ErrUnexpectedEOF
  2599. }
  2600. b := dAtA[iNdEx]
  2601. iNdEx++
  2602. msglen |= int(b&0x7F) << shift
  2603. if b < 0x80 {
  2604. break
  2605. }
  2606. }
  2607. if msglen < 0 {
  2608. return ErrInvalidLengthStructs
  2609. }
  2610. postIndex := iNdEx + msglen
  2611. if postIndex < 0 {
  2612. return ErrInvalidLengthStructs
  2613. }
  2614. if postIndex > l {
  2615. return io.ErrUnexpectedEOF
  2616. }
  2617. m.Versions = append(m.Versions, FileVersionDeprecated{})
  2618. if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2619. return err
  2620. }
  2621. iNdEx = postIndex
  2622. default:
  2623. iNdEx = preIndex
  2624. skippy, err := skipStructs(dAtA[iNdEx:])
  2625. if err != nil {
  2626. return err
  2627. }
  2628. if skippy < 0 {
  2629. return ErrInvalidLengthStructs
  2630. }
  2631. if (iNdEx + skippy) < 0 {
  2632. return ErrInvalidLengthStructs
  2633. }
  2634. if (iNdEx + skippy) > l {
  2635. return io.ErrUnexpectedEOF
  2636. }
  2637. iNdEx += skippy
  2638. }
  2639. }
  2640. if iNdEx > l {
  2641. return io.ErrUnexpectedEOF
  2642. }
  2643. return nil
  2644. }
  2645. func skipStructs(dAtA []byte) (n int, err error) {
  2646. l := len(dAtA)
  2647. iNdEx := 0
  2648. depth := 0
  2649. for iNdEx < l {
  2650. var wire uint64
  2651. for shift := uint(0); ; shift += 7 {
  2652. if shift >= 64 {
  2653. return 0, ErrIntOverflowStructs
  2654. }
  2655. if iNdEx >= l {
  2656. return 0, io.ErrUnexpectedEOF
  2657. }
  2658. b := dAtA[iNdEx]
  2659. iNdEx++
  2660. wire |= (uint64(b) & 0x7F) << shift
  2661. if b < 0x80 {
  2662. break
  2663. }
  2664. }
  2665. wireType := int(wire & 0x7)
  2666. switch wireType {
  2667. case 0:
  2668. for shift := uint(0); ; shift += 7 {
  2669. if shift >= 64 {
  2670. return 0, ErrIntOverflowStructs
  2671. }
  2672. if iNdEx >= l {
  2673. return 0, io.ErrUnexpectedEOF
  2674. }
  2675. iNdEx++
  2676. if dAtA[iNdEx-1] < 0x80 {
  2677. break
  2678. }
  2679. }
  2680. case 1:
  2681. iNdEx += 8
  2682. case 2:
  2683. var length int
  2684. for shift := uint(0); ; shift += 7 {
  2685. if shift >= 64 {
  2686. return 0, ErrIntOverflowStructs
  2687. }
  2688. if iNdEx >= l {
  2689. return 0, io.ErrUnexpectedEOF
  2690. }
  2691. b := dAtA[iNdEx]
  2692. iNdEx++
  2693. length |= (int(b) & 0x7F) << shift
  2694. if b < 0x80 {
  2695. break
  2696. }
  2697. }
  2698. if length < 0 {
  2699. return 0, ErrInvalidLengthStructs
  2700. }
  2701. iNdEx += length
  2702. case 3:
  2703. depth++
  2704. case 4:
  2705. if depth == 0 {
  2706. return 0, ErrUnexpectedEndOfGroupStructs
  2707. }
  2708. depth--
  2709. case 5:
  2710. iNdEx += 4
  2711. default:
  2712. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2713. }
  2714. if iNdEx < 0 {
  2715. return 0, ErrInvalidLengthStructs
  2716. }
  2717. if depth == 0 {
  2718. return iNdEx, nil
  2719. }
  2720. }
  2721. return 0, io.ErrUnexpectedEOF
  2722. }
  2723. var (
  2724. ErrInvalidLengthStructs = fmt.Errorf("proto: negative length found during unmarshaling")
  2725. ErrIntOverflowStructs = fmt.Errorf("proto: integer overflow")
  2726. ErrUnexpectedEndOfGroupStructs = fmt.Errorf("proto: unexpected end of group")
  2727. )