structs.pb.go 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196
  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. Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
  26. Invalid bool `protobuf:"varint,3,opt,name=invalid,proto3" json:"invalid,omitempty"`
  27. }
  28. func (m *FileVersion) Reset() { *m = FileVersion{} }
  29. func (m *FileVersion) String() string { return proto.CompactTextString(m) }
  30. func (*FileVersion) ProtoMessage() {}
  31. func (*FileVersion) Descriptor() ([]byte, []int) {
  32. return fileDescriptor_e774e8f5f348d14d, []int{0}
  33. }
  34. func (m *FileVersion) XXX_Unmarshal(b []byte) error {
  35. return m.Unmarshal(b)
  36. }
  37. func (m *FileVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  38. if deterministic {
  39. return xxx_messageInfo_FileVersion.Marshal(b, m, deterministic)
  40. } else {
  41. b = b[:cap(b)]
  42. n, err := m.MarshalToSizedBuffer(b)
  43. if err != nil {
  44. return nil, err
  45. }
  46. return b[:n], nil
  47. }
  48. }
  49. func (m *FileVersion) XXX_Merge(src proto.Message) {
  50. xxx_messageInfo_FileVersion.Merge(m, src)
  51. }
  52. func (m *FileVersion) XXX_Size() int {
  53. return m.ProtoSize()
  54. }
  55. func (m *FileVersion) XXX_DiscardUnknown() {
  56. xxx_messageInfo_FileVersion.DiscardUnknown(m)
  57. }
  58. var xxx_messageInfo_FileVersion proto.InternalMessageInfo
  59. type VersionList struct {
  60. Versions []FileVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions"`
  61. }
  62. func (m *VersionList) Reset() { *m = VersionList{} }
  63. func (*VersionList) ProtoMessage() {}
  64. func (*VersionList) Descriptor() ([]byte, []int) {
  65. return fileDescriptor_e774e8f5f348d14d, []int{1}
  66. }
  67. func (m *VersionList) XXX_Unmarshal(b []byte) error {
  68. return m.Unmarshal(b)
  69. }
  70. func (m *VersionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  71. if deterministic {
  72. return xxx_messageInfo_VersionList.Marshal(b, m, deterministic)
  73. } else {
  74. b = b[:cap(b)]
  75. n, err := m.MarshalToSizedBuffer(b)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return b[:n], nil
  80. }
  81. }
  82. func (m *VersionList) XXX_Merge(src proto.Message) {
  83. xxx_messageInfo_VersionList.Merge(m, src)
  84. }
  85. func (m *VersionList) XXX_Size() int {
  86. return m.ProtoSize()
  87. }
  88. func (m *VersionList) XXX_DiscardUnknown() {
  89. xxx_messageInfo_VersionList.DiscardUnknown(m)
  90. }
  91. var xxx_messageInfo_VersionList proto.InternalMessageInfo
  92. // Must be the same as FileInfo but without the blocks field
  93. type FileInfoTruncated struct {
  94. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  95. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  96. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
  97. 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"`
  98. Version protocol.Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version"`
  99. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
  100. // repeated BlockInfo Blocks = 16
  101. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"`
  102. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocks_hash,omitempty"`
  103. Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  104. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  105. ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
  106. RawBlockSize int32 `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
  107. // see bep.proto
  108. LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"local_flags,omitempty"`
  109. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  110. RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  111. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  112. }
  113. func (m *FileInfoTruncated) Reset() { *m = FileInfoTruncated{} }
  114. func (*FileInfoTruncated) ProtoMessage() {}
  115. func (*FileInfoTruncated) Descriptor() ([]byte, []int) {
  116. return fileDescriptor_e774e8f5f348d14d, []int{2}
  117. }
  118. func (m *FileInfoTruncated) XXX_Unmarshal(b []byte) error {
  119. return m.Unmarshal(b)
  120. }
  121. func (m *FileInfoTruncated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  122. if deterministic {
  123. return xxx_messageInfo_FileInfoTruncated.Marshal(b, m, deterministic)
  124. } else {
  125. b = b[:cap(b)]
  126. n, err := m.MarshalToSizedBuffer(b)
  127. if err != nil {
  128. return nil, err
  129. }
  130. return b[:n], nil
  131. }
  132. }
  133. func (m *FileInfoTruncated) XXX_Merge(src proto.Message) {
  134. xxx_messageInfo_FileInfoTruncated.Merge(m, src)
  135. }
  136. func (m *FileInfoTruncated) XXX_Size() int {
  137. return m.ProtoSize()
  138. }
  139. func (m *FileInfoTruncated) XXX_DiscardUnknown() {
  140. xxx_messageInfo_FileInfoTruncated.DiscardUnknown(m)
  141. }
  142. var xxx_messageInfo_FileInfoTruncated proto.InternalMessageInfo
  143. // BlockList is the structure used to store block lists
  144. type BlockList struct {
  145. Blocks []protocol.BlockInfo `protobuf:"bytes,1,rep,name=Blocks,proto3" json:"Blocks"`
  146. }
  147. func (m *BlockList) Reset() { *m = BlockList{} }
  148. func (m *BlockList) String() string { return proto.CompactTextString(m) }
  149. func (*BlockList) ProtoMessage() {}
  150. func (*BlockList) Descriptor() ([]byte, []int) {
  151. return fileDescriptor_e774e8f5f348d14d, []int{3}
  152. }
  153. func (m *BlockList) XXX_Unmarshal(b []byte) error {
  154. return m.Unmarshal(b)
  155. }
  156. func (m *BlockList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  157. if deterministic {
  158. return xxx_messageInfo_BlockList.Marshal(b, m, deterministic)
  159. } else {
  160. b = b[:cap(b)]
  161. n, err := m.MarshalToSizedBuffer(b)
  162. if err != nil {
  163. return nil, err
  164. }
  165. return b[:n], nil
  166. }
  167. }
  168. func (m *BlockList) XXX_Merge(src proto.Message) {
  169. xxx_messageInfo_BlockList.Merge(m, src)
  170. }
  171. func (m *BlockList) XXX_Size() int {
  172. return m.ProtoSize()
  173. }
  174. func (m *BlockList) XXX_DiscardUnknown() {
  175. xxx_messageInfo_BlockList.DiscardUnknown(m)
  176. }
  177. var xxx_messageInfo_BlockList proto.InternalMessageInfo
  178. // BlocksHashOnly is used to only unmarshal the block list hash from a FileInfo
  179. type BlocksHashOnly struct {
  180. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocks_hash,omitempty"`
  181. }
  182. func (m *BlocksHashOnly) Reset() { *m = BlocksHashOnly{} }
  183. func (m *BlocksHashOnly) String() string { return proto.CompactTextString(m) }
  184. func (*BlocksHashOnly) ProtoMessage() {}
  185. func (*BlocksHashOnly) Descriptor() ([]byte, []int) {
  186. return fileDescriptor_e774e8f5f348d14d, []int{4}
  187. }
  188. func (m *BlocksHashOnly) XXX_Unmarshal(b []byte) error {
  189. return m.Unmarshal(b)
  190. }
  191. func (m *BlocksHashOnly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  192. if deterministic {
  193. return xxx_messageInfo_BlocksHashOnly.Marshal(b, m, deterministic)
  194. } else {
  195. b = b[:cap(b)]
  196. n, err := m.MarshalToSizedBuffer(b)
  197. if err != nil {
  198. return nil, err
  199. }
  200. return b[:n], nil
  201. }
  202. }
  203. func (m *BlocksHashOnly) XXX_Merge(src proto.Message) {
  204. xxx_messageInfo_BlocksHashOnly.Merge(m, src)
  205. }
  206. func (m *BlocksHashOnly) XXX_Size() int {
  207. return m.ProtoSize()
  208. }
  209. func (m *BlocksHashOnly) XXX_DiscardUnknown() {
  210. xxx_messageInfo_BlocksHashOnly.DiscardUnknown(m)
  211. }
  212. var xxx_messageInfo_BlocksHashOnly proto.InternalMessageInfo
  213. // For each folder and device we keep one of these to track the current
  214. // counts and sequence. We also keep one for the global state of the folder.
  215. type Counts struct {
  216. Files int32 `protobuf:"varint,1,opt,name=files,proto3" json:"files,omitempty"`
  217. Directories int32 `protobuf:"varint,2,opt,name=directories,proto3" json:"directories,omitempty"`
  218. Symlinks int32 `protobuf:"varint,3,opt,name=symlinks,proto3" json:"symlinks,omitempty"`
  219. Deleted int32 `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
  220. Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"`
  221. Sequence int64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence,omitempty"`
  222. DeviceID []byte `protobuf:"bytes,17,opt,name=deviceID,proto3" json:"deviceID,omitempty"`
  223. LocalFlags uint32 `protobuf:"varint,18,opt,name=localFlags,proto3" json:"localFlags,omitempty"`
  224. }
  225. func (m *Counts) Reset() { *m = Counts{} }
  226. func (m *Counts) String() string { return proto.CompactTextString(m) }
  227. func (*Counts) ProtoMessage() {}
  228. func (*Counts) Descriptor() ([]byte, []int) {
  229. return fileDescriptor_e774e8f5f348d14d, []int{5}
  230. }
  231. func (m *Counts) XXX_Unmarshal(b []byte) error {
  232. return m.Unmarshal(b)
  233. }
  234. func (m *Counts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  235. if deterministic {
  236. return xxx_messageInfo_Counts.Marshal(b, m, deterministic)
  237. } else {
  238. b = b[:cap(b)]
  239. n, err := m.MarshalToSizedBuffer(b)
  240. if err != nil {
  241. return nil, err
  242. }
  243. return b[:n], nil
  244. }
  245. }
  246. func (m *Counts) XXX_Merge(src proto.Message) {
  247. xxx_messageInfo_Counts.Merge(m, src)
  248. }
  249. func (m *Counts) XXX_Size() int {
  250. return m.ProtoSize()
  251. }
  252. func (m *Counts) XXX_DiscardUnknown() {
  253. xxx_messageInfo_Counts.DiscardUnknown(m)
  254. }
  255. var xxx_messageInfo_Counts proto.InternalMessageInfo
  256. type CountsSet struct {
  257. Counts []Counts `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts"`
  258. Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"`
  259. }
  260. func (m *CountsSet) Reset() { *m = CountsSet{} }
  261. func (m *CountsSet) String() string { return proto.CompactTextString(m) }
  262. func (*CountsSet) ProtoMessage() {}
  263. func (*CountsSet) Descriptor() ([]byte, []int) {
  264. return fileDescriptor_e774e8f5f348d14d, []int{6}
  265. }
  266. func (m *CountsSet) XXX_Unmarshal(b []byte) error {
  267. return m.Unmarshal(b)
  268. }
  269. func (m *CountsSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  270. if deterministic {
  271. return xxx_messageInfo_CountsSet.Marshal(b, m, deterministic)
  272. } else {
  273. b = b[:cap(b)]
  274. n, err := m.MarshalToSizedBuffer(b)
  275. if err != nil {
  276. return nil, err
  277. }
  278. return b[:n], nil
  279. }
  280. }
  281. func (m *CountsSet) XXX_Merge(src proto.Message) {
  282. xxx_messageInfo_CountsSet.Merge(m, src)
  283. }
  284. func (m *CountsSet) XXX_Size() int {
  285. return m.ProtoSize()
  286. }
  287. func (m *CountsSet) XXX_DiscardUnknown() {
  288. xxx_messageInfo_CountsSet.DiscardUnknown(m)
  289. }
  290. var xxx_messageInfo_CountsSet proto.InternalMessageInfo
  291. func init() {
  292. proto.RegisterType((*FileVersion)(nil), "db.FileVersion")
  293. proto.RegisterType((*VersionList)(nil), "db.VersionList")
  294. proto.RegisterType((*FileInfoTruncated)(nil), "db.FileInfoTruncated")
  295. proto.RegisterType((*BlockList)(nil), "db.BlockList")
  296. proto.RegisterType((*BlocksHashOnly)(nil), "db.BlocksHashOnly")
  297. proto.RegisterType((*Counts)(nil), "db.Counts")
  298. proto.RegisterType((*CountsSet)(nil), "db.CountsSet")
  299. }
  300. func init() { proto.RegisterFile("structs.proto", fileDescriptor_e774e8f5f348d14d) }
  301. var fileDescriptor_e774e8f5f348d14d = []byte{
  302. // 743 bytes of a gzipped FileDescriptorProto
  303. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcf, 0x6f, 0xe3, 0x44,
  304. 0x14, 0x8e, 0x37, 0x71, 0x9a, 0x3c, 0x27, 0x61, 0x77, 0x58, 0x55, 0x56, 0x24, 0x1c, 0x2b, 0x08,
  305. 0xc9, 0xe2, 0x90, 0xb0, 0xdd, 0x1b, 0x48, 0x1c, 0xcc, 0xaa, 0x22, 0x12, 0x62, 0xd1, 0x64, 0xd5,
  306. 0x13, 0x52, 0xe4, 0x1f, 0x93, 0x64, 0x54, 0xc7, 0x93, 0x7a, 0x26, 0xad, 0xdc, 0x1b, 0xff, 0x01,
  307. 0x47, 0x8e, 0xfd, 0x73, 0x7a, 0xec, 0x11, 0x71, 0x88, 0x20, 0xe1, 0xc0, 0x9f, 0x81, 0x66, 0xc6,
  308. 0x76, 0x5c, 0x2e, 0xec, 0x6d, 0xbe, 0xef, 0x3d, 0xfb, 0xbd, 0xf9, 0xbe, 0xcf, 0x86, 0x3e, 0x17,
  309. 0xd9, 0x2e, 0x12, 0x7c, 0xb2, 0xcd, 0x98, 0x60, 0xe8, 0x45, 0x1c, 0x0e, 0x3f, 0xcf, 0xc8, 0x96,
  310. 0xf1, 0xa9, 0x22, 0xc2, 0xdd, 0x72, 0xba, 0x62, 0x2b, 0xa6, 0x80, 0x3a, 0xe9, 0xc6, 0xe1, 0x79,
  311. 0x42, 0x43, 0xdd, 0x12, 0xb1, 0x64, 0x1a, 0x92, 0xad, 0xe6, 0xc7, 0x37, 0x60, 0x5d, 0xd2, 0x84,
  312. 0x5c, 0x91, 0x8c, 0x53, 0x96, 0xa2, 0xaf, 0xe0, 0xec, 0x56, 0x1f, 0x6d, 0xc3, 0x35, 0x3c, 0xeb,
  313. 0xe2, 0xe5, 0xa4, 0x7c, 0x68, 0x72, 0x45, 0x22, 0xc1, 0x32, 0xbf, 0xf5, 0xb8, 0x1f, 0x35, 0x70,
  314. 0xd9, 0x86, 0xce, 0xa1, 0x1d, 0x93, 0x5b, 0x1a, 0x11, 0xfb, 0x85, 0x6b, 0x78, 0x3d, 0x5c, 0x20,
  315. 0x64, 0xc3, 0x19, 0x4d, 0x6f, 0x83, 0x84, 0xc6, 0x76, 0xd3, 0x35, 0xbc, 0x0e, 0x2e, 0xe1, 0xf8,
  316. 0x12, 0xac, 0x62, 0xdc, 0x0f, 0x94, 0x0b, 0xf4, 0x06, 0x3a, 0xc5, 0xbb, 0xb8, 0x6d, 0xb8, 0x4d,
  317. 0xcf, 0xba, 0xf8, 0x64, 0x12, 0x87, 0x93, 0xda, 0x56, 0xc5, 0xc8, 0xaa, 0xed, 0xeb, 0xd6, 0x6f,
  318. 0x0f, 0xa3, 0xc6, 0xf8, 0x17, 0x13, 0x5e, 0xc9, 0xae, 0x59, 0xba, 0x64, 0x1f, 0xb2, 0x5d, 0x1a,
  319. 0x05, 0x82, 0xc4, 0x08, 0x41, 0x2b, 0x0d, 0x36, 0x44, 0xad, 0xdf, 0xc5, 0xea, 0x2c, 0x39, 0x4e,
  320. 0xef, 0x89, 0x5a, 0xa4, 0x89, 0xd5, 0x19, 0x7d, 0x06, 0xb0, 0x61, 0x31, 0x5d, 0x52, 0x12, 0x2f,
  321. 0xb8, 0x6d, 0xaa, 0x4a, 0xb7, 0x64, 0xe6, 0xe8, 0x67, 0xb0, 0xaa, 0x72, 0x98, 0xdb, 0x3d, 0xd7,
  322. 0xf0, 0x5a, 0xfe, 0x37, 0x72, 0x8f, 0x3f, 0xf6, 0xa3, 0xb7, 0x2b, 0x2a, 0xd6, 0xbb, 0x70, 0x12,
  323. 0xb1, 0xcd, 0x94, 0xe7, 0x69, 0x24, 0xd6, 0x34, 0x5d, 0xd5, 0x4e, 0x75, 0xad, 0x27, 0xf3, 0x35,
  324. 0xcb, 0xc4, 0xec, 0x1d, 0xae, 0xc6, 0xf9, 0x79, 0x5d, 0xe6, 0xee, 0xc7, 0xc9, 0x3c, 0x84, 0x0e,
  325. 0x27, 0x37, 0x3b, 0x92, 0x46, 0xc4, 0x06, 0xb5, 0x6c, 0x85, 0xd1, 0x17, 0x30, 0xe0, 0xf9, 0x26,
  326. 0xa1, 0xe9, 0xf5, 0x42, 0x04, 0xd9, 0x8a, 0x08, 0xfb, 0x95, 0xba, 0x7c, 0xbf, 0x60, 0x3f, 0x28,
  327. 0x12, 0x8d, 0xc0, 0x0a, 0x13, 0x16, 0x5d, 0xf3, 0xc5, 0x3a, 0xe0, 0x6b, 0x1b, 0x29, 0xbb, 0x40,
  328. 0x53, 0xdf, 0x07, 0x7c, 0x8d, 0xbe, 0x84, 0x96, 0xc8, 0xb7, 0xda, 0xc8, 0xc1, 0xc5, 0xf9, 0x69,
  329. 0xa5, 0x4a, 0xe5, 0x7c, 0x4b, 0xb0, 0xea, 0x41, 0x2e, 0x58, 0x5b, 0x92, 0x6d, 0x28, 0xd7, 0xc6,
  330. 0xb5, 0x5c, 0xc3, 0xeb, 0xe3, 0x3a, 0x25, 0xc7, 0x55, 0x0a, 0xa6, 0xdc, 0xb6, 0x5c, 0xc3, 0x33,
  331. 0x4f, 0x22, 0xfc, 0xc8, 0xd1, 0x14, 0xf4, 0xf0, 0x85, 0xf2, 0xa6, 0x2f, 0xeb, 0xfe, 0xcb, 0xc3,
  332. 0x7e, 0xd4, 0xc3, 0xc1, 0x9d, 0x2f, 0x0b, 0x73, 0x7a, 0x4f, 0x70, 0x37, 0x2c, 0x8f, 0x72, 0x66,
  333. 0xc2, 0xa2, 0x20, 0x59, 0x2c, 0x93, 0x60, 0xc5, 0xed, 0x7f, 0xce, 0xd4, 0x50, 0x50, 0xdc, 0xa5,
  334. 0xa4, 0x64, 0xe8, 0x62, 0x92, 0x10, 0x41, 0x62, 0xbb, 0xad, 0x43, 0x57, 0x40, 0xe4, 0x9d, 0xe2,
  335. 0x28, 0x1f, 0xeb, 0xf8, 0x83, 0xc3, 0x7e, 0x04, 0x38, 0xb8, 0x9b, 0x69, 0xb6, 0x8a, 0xa7, 0x54,
  336. 0x33, 0x65, 0x8b, 0xfa, 0xe5, 0x3a, 0xea, 0x55, 0xfd, 0x94, 0xfd, 0x74, 0x22, 0x8b, 0x0c, 0x7e,
  337. 0x0b, 0x5d, 0xb5, 0x6a, 0x91, 0xe4, 0xb6, 0x02, 0x65, 0x8e, 0x3f, 0x3d, 0x29, 0xa8, 0x78, 0x29,
  338. 0x61, 0xe1, 0x6b, 0xd1, 0x38, 0x7e, 0x03, 0x03, 0xbf, 0x32, 0xe0, 0x7d, 0x9a, 0xe4, 0xff, 0xeb,
  339. 0xd2, 0xf8, 0x6f, 0x03, 0xda, 0xdf, 0xb1, 0x5d, 0x2a, 0x38, 0x7a, 0x0d, 0xe6, 0x92, 0x26, 0x84,
  340. 0xab, 0xb0, 0x9b, 0x58, 0x03, 0x29, 0x53, 0x4c, 0x33, 0x95, 0x22, 0x4a, 0xb8, 0x72, 0xd3, 0xc4,
  341. 0x75, 0x4a, 0x85, 0x49, 0x47, 0x83, 0xab, 0x6f, 0xc2, 0xc4, 0x15, 0xae, 0x4b, 0xd8, 0x52, 0xa5,
  342. 0x4a, 0xc2, 0xd7, 0x60, 0x86, 0xb9, 0x20, 0xe5, 0xc7, 0xa2, 0xc1, 0xb3, 0x60, 0xb6, 0xff, 0x13,
  343. 0xcc, 0x21, 0x74, 0xf4, 0xdf, 0x60, 0xf6, 0x4e, 0x45, 0xb2, 0x87, 0x2b, 0x8c, 0x1c, 0xa8, 0x19,
  344. 0xa7, 0xae, 0xf9, 0xcc, 0xca, 0xf1, 0x7b, 0xe8, 0xea, 0x5b, 0xce, 0x89, 0x40, 0x1e, 0xb4, 0x23,
  345. 0x05, 0x0a, 0x65, 0x41, 0xfe, 0x21, 0x74, 0xb9, 0x14, 0x54, 0xd7, 0xe5, 0xfa, 0x51, 0x46, 0xe4,
  346. 0x9f, 0x40, 0x5d, 0xbc, 0x89, 0x4b, 0xe8, 0xbb, 0x8f, 0x7f, 0x39, 0x8d, 0xc7, 0x83, 0x63, 0x3c,
  347. 0x1d, 0x1c, 0xe3, 0xcf, 0x83, 0xd3, 0xf8, 0xf5, 0xe8, 0x34, 0x1e, 0x8e, 0x8e, 0xf1, 0x74, 0x74,
  348. 0x1a, 0xbf, 0x1f, 0x9d, 0x46, 0xd8, 0x56, 0x76, 0xbd, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0xb8,
  349. 0xd0, 0x05, 0xba, 0x64, 0x05, 0x00, 0x00,
  350. }
  351. func (m *FileVersion) Marshal() (dAtA []byte, err error) {
  352. size := m.ProtoSize()
  353. dAtA = make([]byte, size)
  354. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  355. if err != nil {
  356. return nil, err
  357. }
  358. return dAtA[:n], nil
  359. }
  360. func (m *FileVersion) MarshalTo(dAtA []byte) (int, error) {
  361. size := m.ProtoSize()
  362. return m.MarshalToSizedBuffer(dAtA[:size])
  363. }
  364. func (m *FileVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  365. i := len(dAtA)
  366. _ = i
  367. var l int
  368. _ = l
  369. if m.Invalid {
  370. i--
  371. if m.Invalid {
  372. dAtA[i] = 1
  373. } else {
  374. dAtA[i] = 0
  375. }
  376. i--
  377. dAtA[i] = 0x18
  378. }
  379. if len(m.Device) > 0 {
  380. i -= len(m.Device)
  381. copy(dAtA[i:], m.Device)
  382. i = encodeVarintStructs(dAtA, i, uint64(len(m.Device)))
  383. i--
  384. dAtA[i] = 0x12
  385. }
  386. {
  387. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  388. if err != nil {
  389. return 0, err
  390. }
  391. i -= size
  392. i = encodeVarintStructs(dAtA, i, uint64(size))
  393. }
  394. i--
  395. dAtA[i] = 0xa
  396. return len(dAtA) - i, nil
  397. }
  398. func (m *VersionList) Marshal() (dAtA []byte, err error) {
  399. size := m.ProtoSize()
  400. dAtA = make([]byte, size)
  401. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  402. if err != nil {
  403. return nil, err
  404. }
  405. return dAtA[:n], nil
  406. }
  407. func (m *VersionList) MarshalTo(dAtA []byte) (int, error) {
  408. size := m.ProtoSize()
  409. return m.MarshalToSizedBuffer(dAtA[:size])
  410. }
  411. func (m *VersionList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  412. i := len(dAtA)
  413. _ = i
  414. var l int
  415. _ = l
  416. if len(m.Versions) > 0 {
  417. for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- {
  418. {
  419. size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  420. if err != nil {
  421. return 0, err
  422. }
  423. i -= size
  424. i = encodeVarintStructs(dAtA, i, uint64(size))
  425. }
  426. i--
  427. dAtA[i] = 0xa
  428. }
  429. }
  430. return len(dAtA) - i, nil
  431. }
  432. func (m *FileInfoTruncated) Marshal() (dAtA []byte, err error) {
  433. size := m.ProtoSize()
  434. dAtA = make([]byte, size)
  435. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  436. if err != nil {
  437. return nil, err
  438. }
  439. return dAtA[:n], nil
  440. }
  441. func (m *FileInfoTruncated) MarshalTo(dAtA []byte) (int, error) {
  442. size := m.ProtoSize()
  443. return m.MarshalToSizedBuffer(dAtA[:size])
  444. }
  445. func (m *FileInfoTruncated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  446. i := len(dAtA)
  447. _ = i
  448. var l int
  449. _ = l
  450. if m.LocalFlags != 0 {
  451. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  452. i--
  453. dAtA[i] = 0x3e
  454. i--
  455. dAtA[i] = 0xc0
  456. }
  457. if len(m.BlocksHash) > 0 {
  458. i -= len(m.BlocksHash)
  459. copy(dAtA[i:], m.BlocksHash)
  460. i = encodeVarintStructs(dAtA, i, uint64(len(m.BlocksHash)))
  461. i--
  462. dAtA[i] = 0x1
  463. i--
  464. dAtA[i] = 0x92
  465. }
  466. if len(m.SymlinkTarget) > 0 {
  467. i -= len(m.SymlinkTarget)
  468. copy(dAtA[i:], m.SymlinkTarget)
  469. i = encodeVarintStructs(dAtA, i, uint64(len(m.SymlinkTarget)))
  470. i--
  471. dAtA[i] = 0x1
  472. i--
  473. dAtA[i] = 0x8a
  474. }
  475. if m.RawBlockSize != 0 {
  476. i = encodeVarintStructs(dAtA, i, uint64(m.RawBlockSize))
  477. i--
  478. dAtA[i] = 0x68
  479. }
  480. if m.ModifiedBy != 0 {
  481. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedBy))
  482. i--
  483. dAtA[i] = 0x60
  484. }
  485. if m.ModifiedNs != 0 {
  486. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedNs))
  487. i--
  488. dAtA[i] = 0x58
  489. }
  490. if m.Sequence != 0 {
  491. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  492. i--
  493. dAtA[i] = 0x50
  494. }
  495. {
  496. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  497. if err != nil {
  498. return 0, err
  499. }
  500. i -= size
  501. i = encodeVarintStructs(dAtA, i, uint64(size))
  502. }
  503. i--
  504. dAtA[i] = 0x4a
  505. if m.NoPermissions {
  506. i--
  507. if m.NoPermissions {
  508. dAtA[i] = 1
  509. } else {
  510. dAtA[i] = 0
  511. }
  512. i--
  513. dAtA[i] = 0x40
  514. }
  515. if m.RawInvalid {
  516. i--
  517. if m.RawInvalid {
  518. dAtA[i] = 1
  519. } else {
  520. dAtA[i] = 0
  521. }
  522. i--
  523. dAtA[i] = 0x38
  524. }
  525. if m.Deleted {
  526. i--
  527. if m.Deleted {
  528. dAtA[i] = 1
  529. } else {
  530. dAtA[i] = 0
  531. }
  532. i--
  533. dAtA[i] = 0x30
  534. }
  535. if m.ModifiedS != 0 {
  536. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedS))
  537. i--
  538. dAtA[i] = 0x28
  539. }
  540. if m.Permissions != 0 {
  541. i = encodeVarintStructs(dAtA, i, uint64(m.Permissions))
  542. i--
  543. dAtA[i] = 0x20
  544. }
  545. if m.Size != 0 {
  546. i = encodeVarintStructs(dAtA, i, uint64(m.Size))
  547. i--
  548. dAtA[i] = 0x18
  549. }
  550. if m.Type != 0 {
  551. i = encodeVarintStructs(dAtA, i, uint64(m.Type))
  552. i--
  553. dAtA[i] = 0x10
  554. }
  555. if len(m.Name) > 0 {
  556. i -= len(m.Name)
  557. copy(dAtA[i:], m.Name)
  558. i = encodeVarintStructs(dAtA, i, uint64(len(m.Name)))
  559. i--
  560. dAtA[i] = 0xa
  561. }
  562. return len(dAtA) - i, nil
  563. }
  564. func (m *BlockList) Marshal() (dAtA []byte, err error) {
  565. size := m.ProtoSize()
  566. dAtA = make([]byte, size)
  567. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  568. if err != nil {
  569. return nil, err
  570. }
  571. return dAtA[:n], nil
  572. }
  573. func (m *BlockList) MarshalTo(dAtA []byte) (int, error) {
  574. size := m.ProtoSize()
  575. return m.MarshalToSizedBuffer(dAtA[:size])
  576. }
  577. func (m *BlockList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  578. i := len(dAtA)
  579. _ = i
  580. var l int
  581. _ = l
  582. if len(m.Blocks) > 0 {
  583. for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
  584. {
  585. size, err := m.Blocks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  586. if err != nil {
  587. return 0, err
  588. }
  589. i -= size
  590. i = encodeVarintStructs(dAtA, i, uint64(size))
  591. }
  592. i--
  593. dAtA[i] = 0xa
  594. }
  595. }
  596. return len(dAtA) - i, nil
  597. }
  598. func (m *BlocksHashOnly) Marshal() (dAtA []byte, err error) {
  599. size := m.ProtoSize()
  600. dAtA = make([]byte, size)
  601. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  602. if err != nil {
  603. return nil, err
  604. }
  605. return dAtA[:n], nil
  606. }
  607. func (m *BlocksHashOnly) MarshalTo(dAtA []byte) (int, error) {
  608. size := m.ProtoSize()
  609. return m.MarshalToSizedBuffer(dAtA[:size])
  610. }
  611. func (m *BlocksHashOnly) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  612. i := len(dAtA)
  613. _ = i
  614. var l int
  615. _ = l
  616. if len(m.BlocksHash) > 0 {
  617. i -= len(m.BlocksHash)
  618. copy(dAtA[i:], m.BlocksHash)
  619. i = encodeVarintStructs(dAtA, i, uint64(len(m.BlocksHash)))
  620. i--
  621. dAtA[i] = 0x1
  622. i--
  623. dAtA[i] = 0x92
  624. }
  625. return len(dAtA) - i, nil
  626. }
  627. func (m *Counts) Marshal() (dAtA []byte, err error) {
  628. size := m.ProtoSize()
  629. dAtA = make([]byte, size)
  630. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  631. if err != nil {
  632. return nil, err
  633. }
  634. return dAtA[:n], nil
  635. }
  636. func (m *Counts) MarshalTo(dAtA []byte) (int, error) {
  637. size := m.ProtoSize()
  638. return m.MarshalToSizedBuffer(dAtA[:size])
  639. }
  640. func (m *Counts) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  641. i := len(dAtA)
  642. _ = i
  643. var l int
  644. _ = l
  645. if m.LocalFlags != 0 {
  646. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  647. i--
  648. dAtA[i] = 0x1
  649. i--
  650. dAtA[i] = 0x90
  651. }
  652. if len(m.DeviceID) > 0 {
  653. i -= len(m.DeviceID)
  654. copy(dAtA[i:], m.DeviceID)
  655. i = encodeVarintStructs(dAtA, i, uint64(len(m.DeviceID)))
  656. i--
  657. dAtA[i] = 0x1
  658. i--
  659. dAtA[i] = 0x8a
  660. }
  661. if m.Sequence != 0 {
  662. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  663. i--
  664. dAtA[i] = 0x30
  665. }
  666. if m.Bytes != 0 {
  667. i = encodeVarintStructs(dAtA, i, uint64(m.Bytes))
  668. i--
  669. dAtA[i] = 0x28
  670. }
  671. if m.Deleted != 0 {
  672. i = encodeVarintStructs(dAtA, i, uint64(m.Deleted))
  673. i--
  674. dAtA[i] = 0x20
  675. }
  676. if m.Symlinks != 0 {
  677. i = encodeVarintStructs(dAtA, i, uint64(m.Symlinks))
  678. i--
  679. dAtA[i] = 0x18
  680. }
  681. if m.Directories != 0 {
  682. i = encodeVarintStructs(dAtA, i, uint64(m.Directories))
  683. i--
  684. dAtA[i] = 0x10
  685. }
  686. if m.Files != 0 {
  687. i = encodeVarintStructs(dAtA, i, uint64(m.Files))
  688. i--
  689. dAtA[i] = 0x8
  690. }
  691. return len(dAtA) - i, nil
  692. }
  693. func (m *CountsSet) Marshal() (dAtA []byte, err error) {
  694. size := m.ProtoSize()
  695. dAtA = make([]byte, size)
  696. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  697. if err != nil {
  698. return nil, err
  699. }
  700. return dAtA[:n], nil
  701. }
  702. func (m *CountsSet) MarshalTo(dAtA []byte) (int, error) {
  703. size := m.ProtoSize()
  704. return m.MarshalToSizedBuffer(dAtA[:size])
  705. }
  706. func (m *CountsSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  707. i := len(dAtA)
  708. _ = i
  709. var l int
  710. _ = l
  711. if m.Created != 0 {
  712. i = encodeVarintStructs(dAtA, i, uint64(m.Created))
  713. i--
  714. dAtA[i] = 0x10
  715. }
  716. if len(m.Counts) > 0 {
  717. for iNdEx := len(m.Counts) - 1; iNdEx >= 0; iNdEx-- {
  718. {
  719. size, err := m.Counts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  720. if err != nil {
  721. return 0, err
  722. }
  723. i -= size
  724. i = encodeVarintStructs(dAtA, i, uint64(size))
  725. }
  726. i--
  727. dAtA[i] = 0xa
  728. }
  729. }
  730. return len(dAtA) - i, nil
  731. }
  732. func encodeVarintStructs(dAtA []byte, offset int, v uint64) int {
  733. offset -= sovStructs(v)
  734. base := offset
  735. for v >= 1<<7 {
  736. dAtA[offset] = uint8(v&0x7f | 0x80)
  737. v >>= 7
  738. offset++
  739. }
  740. dAtA[offset] = uint8(v)
  741. return base
  742. }
  743. func (m *FileVersion) ProtoSize() (n int) {
  744. if m == nil {
  745. return 0
  746. }
  747. var l int
  748. _ = l
  749. l = m.Version.ProtoSize()
  750. n += 1 + l + sovStructs(uint64(l))
  751. l = len(m.Device)
  752. if l > 0 {
  753. n += 1 + l + sovStructs(uint64(l))
  754. }
  755. if m.Invalid {
  756. n += 2
  757. }
  758. return n
  759. }
  760. func (m *VersionList) ProtoSize() (n int) {
  761. if m == nil {
  762. return 0
  763. }
  764. var l int
  765. _ = l
  766. if len(m.Versions) > 0 {
  767. for _, e := range m.Versions {
  768. l = e.ProtoSize()
  769. n += 1 + l + sovStructs(uint64(l))
  770. }
  771. }
  772. return n
  773. }
  774. func (m *FileInfoTruncated) ProtoSize() (n int) {
  775. if m == nil {
  776. return 0
  777. }
  778. var l int
  779. _ = l
  780. l = len(m.Name)
  781. if l > 0 {
  782. n += 1 + l + sovStructs(uint64(l))
  783. }
  784. if m.Type != 0 {
  785. n += 1 + sovStructs(uint64(m.Type))
  786. }
  787. if m.Size != 0 {
  788. n += 1 + sovStructs(uint64(m.Size))
  789. }
  790. if m.Permissions != 0 {
  791. n += 1 + sovStructs(uint64(m.Permissions))
  792. }
  793. if m.ModifiedS != 0 {
  794. n += 1 + sovStructs(uint64(m.ModifiedS))
  795. }
  796. if m.Deleted {
  797. n += 2
  798. }
  799. if m.RawInvalid {
  800. n += 2
  801. }
  802. if m.NoPermissions {
  803. n += 2
  804. }
  805. l = m.Version.ProtoSize()
  806. n += 1 + l + sovStructs(uint64(l))
  807. if m.Sequence != 0 {
  808. n += 1 + sovStructs(uint64(m.Sequence))
  809. }
  810. if m.ModifiedNs != 0 {
  811. n += 1 + sovStructs(uint64(m.ModifiedNs))
  812. }
  813. if m.ModifiedBy != 0 {
  814. n += 1 + sovStructs(uint64(m.ModifiedBy))
  815. }
  816. if m.RawBlockSize != 0 {
  817. n += 1 + sovStructs(uint64(m.RawBlockSize))
  818. }
  819. l = len(m.SymlinkTarget)
  820. if l > 0 {
  821. n += 2 + l + sovStructs(uint64(l))
  822. }
  823. l = len(m.BlocksHash)
  824. if l > 0 {
  825. n += 2 + l + sovStructs(uint64(l))
  826. }
  827. if m.LocalFlags != 0 {
  828. n += 2 + sovStructs(uint64(m.LocalFlags))
  829. }
  830. return n
  831. }
  832. func (m *BlockList) ProtoSize() (n int) {
  833. if m == nil {
  834. return 0
  835. }
  836. var l int
  837. _ = l
  838. if len(m.Blocks) > 0 {
  839. for _, e := range m.Blocks {
  840. l = e.ProtoSize()
  841. n += 1 + l + sovStructs(uint64(l))
  842. }
  843. }
  844. return n
  845. }
  846. func (m *BlocksHashOnly) ProtoSize() (n int) {
  847. if m == nil {
  848. return 0
  849. }
  850. var l int
  851. _ = l
  852. l = len(m.BlocksHash)
  853. if l > 0 {
  854. n += 2 + l + sovStructs(uint64(l))
  855. }
  856. return n
  857. }
  858. func (m *Counts) ProtoSize() (n int) {
  859. if m == nil {
  860. return 0
  861. }
  862. var l int
  863. _ = l
  864. if m.Files != 0 {
  865. n += 1 + sovStructs(uint64(m.Files))
  866. }
  867. if m.Directories != 0 {
  868. n += 1 + sovStructs(uint64(m.Directories))
  869. }
  870. if m.Symlinks != 0 {
  871. n += 1 + sovStructs(uint64(m.Symlinks))
  872. }
  873. if m.Deleted != 0 {
  874. n += 1 + sovStructs(uint64(m.Deleted))
  875. }
  876. if m.Bytes != 0 {
  877. n += 1 + sovStructs(uint64(m.Bytes))
  878. }
  879. if m.Sequence != 0 {
  880. n += 1 + sovStructs(uint64(m.Sequence))
  881. }
  882. l = len(m.DeviceID)
  883. if l > 0 {
  884. n += 2 + l + sovStructs(uint64(l))
  885. }
  886. if m.LocalFlags != 0 {
  887. n += 2 + sovStructs(uint64(m.LocalFlags))
  888. }
  889. return n
  890. }
  891. func (m *CountsSet) ProtoSize() (n int) {
  892. if m == nil {
  893. return 0
  894. }
  895. var l int
  896. _ = l
  897. if len(m.Counts) > 0 {
  898. for _, e := range m.Counts {
  899. l = e.ProtoSize()
  900. n += 1 + l + sovStructs(uint64(l))
  901. }
  902. }
  903. if m.Created != 0 {
  904. n += 1 + sovStructs(uint64(m.Created))
  905. }
  906. return n
  907. }
  908. func sovStructs(x uint64) (n int) {
  909. return (math_bits.Len64(x|1) + 6) / 7
  910. }
  911. func sozStructs(x uint64) (n int) {
  912. return sovStructs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  913. }
  914. func (m *FileVersion) Unmarshal(dAtA []byte) error {
  915. l := len(dAtA)
  916. iNdEx := 0
  917. for iNdEx < l {
  918. preIndex := iNdEx
  919. var wire uint64
  920. for shift := uint(0); ; shift += 7 {
  921. if shift >= 64 {
  922. return ErrIntOverflowStructs
  923. }
  924. if iNdEx >= l {
  925. return io.ErrUnexpectedEOF
  926. }
  927. b := dAtA[iNdEx]
  928. iNdEx++
  929. wire |= uint64(b&0x7F) << shift
  930. if b < 0x80 {
  931. break
  932. }
  933. }
  934. fieldNum := int32(wire >> 3)
  935. wireType := int(wire & 0x7)
  936. if wireType == 4 {
  937. return fmt.Errorf("proto: FileVersion: wiretype end group for non-group")
  938. }
  939. if fieldNum <= 0 {
  940. return fmt.Errorf("proto: FileVersion: illegal tag %d (wire type %d)", fieldNum, wire)
  941. }
  942. switch fieldNum {
  943. case 1:
  944. if wireType != 2 {
  945. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  946. }
  947. var msglen int
  948. for shift := uint(0); ; shift += 7 {
  949. if shift >= 64 {
  950. return ErrIntOverflowStructs
  951. }
  952. if iNdEx >= l {
  953. return io.ErrUnexpectedEOF
  954. }
  955. b := dAtA[iNdEx]
  956. iNdEx++
  957. msglen |= int(b&0x7F) << shift
  958. if b < 0x80 {
  959. break
  960. }
  961. }
  962. if msglen < 0 {
  963. return ErrInvalidLengthStructs
  964. }
  965. postIndex := iNdEx + msglen
  966. if postIndex < 0 {
  967. return ErrInvalidLengthStructs
  968. }
  969. if postIndex > l {
  970. return io.ErrUnexpectedEOF
  971. }
  972. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  973. return err
  974. }
  975. iNdEx = postIndex
  976. case 2:
  977. if wireType != 2 {
  978. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  979. }
  980. var byteLen int
  981. for shift := uint(0); ; shift += 7 {
  982. if shift >= 64 {
  983. return ErrIntOverflowStructs
  984. }
  985. if iNdEx >= l {
  986. return io.ErrUnexpectedEOF
  987. }
  988. b := dAtA[iNdEx]
  989. iNdEx++
  990. byteLen |= int(b&0x7F) << shift
  991. if b < 0x80 {
  992. break
  993. }
  994. }
  995. if byteLen < 0 {
  996. return ErrInvalidLengthStructs
  997. }
  998. postIndex := iNdEx + byteLen
  999. if postIndex < 0 {
  1000. return ErrInvalidLengthStructs
  1001. }
  1002. if postIndex > l {
  1003. return io.ErrUnexpectedEOF
  1004. }
  1005. m.Device = append(m.Device[:0], dAtA[iNdEx:postIndex]...)
  1006. if m.Device == nil {
  1007. m.Device = []byte{}
  1008. }
  1009. iNdEx = postIndex
  1010. case 3:
  1011. if wireType != 0 {
  1012. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  1013. }
  1014. var v int
  1015. for shift := uint(0); ; shift += 7 {
  1016. if shift >= 64 {
  1017. return ErrIntOverflowStructs
  1018. }
  1019. if iNdEx >= l {
  1020. return io.ErrUnexpectedEOF
  1021. }
  1022. b := dAtA[iNdEx]
  1023. iNdEx++
  1024. v |= int(b&0x7F) << shift
  1025. if b < 0x80 {
  1026. break
  1027. }
  1028. }
  1029. m.Invalid = bool(v != 0)
  1030. default:
  1031. iNdEx = preIndex
  1032. skippy, err := skipStructs(dAtA[iNdEx:])
  1033. if err != nil {
  1034. return err
  1035. }
  1036. if skippy < 0 {
  1037. return ErrInvalidLengthStructs
  1038. }
  1039. if (iNdEx + skippy) < 0 {
  1040. return ErrInvalidLengthStructs
  1041. }
  1042. if (iNdEx + skippy) > l {
  1043. return io.ErrUnexpectedEOF
  1044. }
  1045. iNdEx += skippy
  1046. }
  1047. }
  1048. if iNdEx > l {
  1049. return io.ErrUnexpectedEOF
  1050. }
  1051. return nil
  1052. }
  1053. func (m *VersionList) Unmarshal(dAtA []byte) error {
  1054. l := len(dAtA)
  1055. iNdEx := 0
  1056. for iNdEx < l {
  1057. preIndex := iNdEx
  1058. var wire uint64
  1059. for shift := uint(0); ; shift += 7 {
  1060. if shift >= 64 {
  1061. return ErrIntOverflowStructs
  1062. }
  1063. if iNdEx >= l {
  1064. return io.ErrUnexpectedEOF
  1065. }
  1066. b := dAtA[iNdEx]
  1067. iNdEx++
  1068. wire |= uint64(b&0x7F) << shift
  1069. if b < 0x80 {
  1070. break
  1071. }
  1072. }
  1073. fieldNum := int32(wire >> 3)
  1074. wireType := int(wire & 0x7)
  1075. if wireType == 4 {
  1076. return fmt.Errorf("proto: VersionList: wiretype end group for non-group")
  1077. }
  1078. if fieldNum <= 0 {
  1079. return fmt.Errorf("proto: VersionList: illegal tag %d (wire type %d)", fieldNum, wire)
  1080. }
  1081. switch fieldNum {
  1082. case 1:
  1083. if wireType != 2 {
  1084. return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
  1085. }
  1086. var msglen int
  1087. for shift := uint(0); ; shift += 7 {
  1088. if shift >= 64 {
  1089. return ErrIntOverflowStructs
  1090. }
  1091. if iNdEx >= l {
  1092. return io.ErrUnexpectedEOF
  1093. }
  1094. b := dAtA[iNdEx]
  1095. iNdEx++
  1096. msglen |= int(b&0x7F) << shift
  1097. if b < 0x80 {
  1098. break
  1099. }
  1100. }
  1101. if msglen < 0 {
  1102. return ErrInvalidLengthStructs
  1103. }
  1104. postIndex := iNdEx + msglen
  1105. if postIndex < 0 {
  1106. return ErrInvalidLengthStructs
  1107. }
  1108. if postIndex > l {
  1109. return io.ErrUnexpectedEOF
  1110. }
  1111. m.Versions = append(m.Versions, FileVersion{})
  1112. if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1113. return err
  1114. }
  1115. iNdEx = postIndex
  1116. default:
  1117. iNdEx = preIndex
  1118. skippy, err := skipStructs(dAtA[iNdEx:])
  1119. if err != nil {
  1120. return err
  1121. }
  1122. if skippy < 0 {
  1123. return ErrInvalidLengthStructs
  1124. }
  1125. if (iNdEx + skippy) < 0 {
  1126. return ErrInvalidLengthStructs
  1127. }
  1128. if (iNdEx + skippy) > l {
  1129. return io.ErrUnexpectedEOF
  1130. }
  1131. iNdEx += skippy
  1132. }
  1133. }
  1134. if iNdEx > l {
  1135. return io.ErrUnexpectedEOF
  1136. }
  1137. return nil
  1138. }
  1139. func (m *FileInfoTruncated) Unmarshal(dAtA []byte) error {
  1140. l := len(dAtA)
  1141. iNdEx := 0
  1142. for iNdEx < l {
  1143. preIndex := iNdEx
  1144. var wire uint64
  1145. for shift := uint(0); ; shift += 7 {
  1146. if shift >= 64 {
  1147. return ErrIntOverflowStructs
  1148. }
  1149. if iNdEx >= l {
  1150. return io.ErrUnexpectedEOF
  1151. }
  1152. b := dAtA[iNdEx]
  1153. iNdEx++
  1154. wire |= uint64(b&0x7F) << shift
  1155. if b < 0x80 {
  1156. break
  1157. }
  1158. }
  1159. fieldNum := int32(wire >> 3)
  1160. wireType := int(wire & 0x7)
  1161. if wireType == 4 {
  1162. return fmt.Errorf("proto: FileInfoTruncated: wiretype end group for non-group")
  1163. }
  1164. if fieldNum <= 0 {
  1165. return fmt.Errorf("proto: FileInfoTruncated: illegal tag %d (wire type %d)", fieldNum, wire)
  1166. }
  1167. switch fieldNum {
  1168. case 1:
  1169. if wireType != 2 {
  1170. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1171. }
  1172. var stringLen 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. stringLen |= uint64(b&0x7F) << shift
  1183. if b < 0x80 {
  1184. break
  1185. }
  1186. }
  1187. intStringLen := int(stringLen)
  1188. if intStringLen < 0 {
  1189. return ErrInvalidLengthStructs
  1190. }
  1191. postIndex := iNdEx + intStringLen
  1192. if postIndex < 0 {
  1193. return ErrInvalidLengthStructs
  1194. }
  1195. if postIndex > l {
  1196. return io.ErrUnexpectedEOF
  1197. }
  1198. m.Name = string(dAtA[iNdEx:postIndex])
  1199. iNdEx = postIndex
  1200. case 2:
  1201. if wireType != 0 {
  1202. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1203. }
  1204. m.Type = 0
  1205. for shift := uint(0); ; shift += 7 {
  1206. if shift >= 64 {
  1207. return ErrIntOverflowStructs
  1208. }
  1209. if iNdEx >= l {
  1210. return io.ErrUnexpectedEOF
  1211. }
  1212. b := dAtA[iNdEx]
  1213. iNdEx++
  1214. m.Type |= protocol.FileInfoType(b&0x7F) << shift
  1215. if b < 0x80 {
  1216. break
  1217. }
  1218. }
  1219. case 3:
  1220. if wireType != 0 {
  1221. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  1222. }
  1223. m.Size = 0
  1224. for shift := uint(0); ; shift += 7 {
  1225. if shift >= 64 {
  1226. return ErrIntOverflowStructs
  1227. }
  1228. if iNdEx >= l {
  1229. return io.ErrUnexpectedEOF
  1230. }
  1231. b := dAtA[iNdEx]
  1232. iNdEx++
  1233. m.Size |= int64(b&0x7F) << shift
  1234. if b < 0x80 {
  1235. break
  1236. }
  1237. }
  1238. case 4:
  1239. if wireType != 0 {
  1240. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  1241. }
  1242. m.Permissions = 0
  1243. for shift := uint(0); ; shift += 7 {
  1244. if shift >= 64 {
  1245. return ErrIntOverflowStructs
  1246. }
  1247. if iNdEx >= l {
  1248. return io.ErrUnexpectedEOF
  1249. }
  1250. b := dAtA[iNdEx]
  1251. iNdEx++
  1252. m.Permissions |= uint32(b&0x7F) << shift
  1253. if b < 0x80 {
  1254. break
  1255. }
  1256. }
  1257. case 5:
  1258. if wireType != 0 {
  1259. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  1260. }
  1261. m.ModifiedS = 0
  1262. for shift := uint(0); ; shift += 7 {
  1263. if shift >= 64 {
  1264. return ErrIntOverflowStructs
  1265. }
  1266. if iNdEx >= l {
  1267. return io.ErrUnexpectedEOF
  1268. }
  1269. b := dAtA[iNdEx]
  1270. iNdEx++
  1271. m.ModifiedS |= int64(b&0x7F) << shift
  1272. if b < 0x80 {
  1273. break
  1274. }
  1275. }
  1276. case 6:
  1277. if wireType != 0 {
  1278. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1279. }
  1280. var v int
  1281. for shift := uint(0); ; shift += 7 {
  1282. if shift >= 64 {
  1283. return ErrIntOverflowStructs
  1284. }
  1285. if iNdEx >= l {
  1286. return io.ErrUnexpectedEOF
  1287. }
  1288. b := dAtA[iNdEx]
  1289. iNdEx++
  1290. v |= int(b&0x7F) << shift
  1291. if b < 0x80 {
  1292. break
  1293. }
  1294. }
  1295. m.Deleted = bool(v != 0)
  1296. case 7:
  1297. if wireType != 0 {
  1298. return fmt.Errorf("proto: wrong wireType = %d for field RawInvalid", wireType)
  1299. }
  1300. var v int
  1301. for shift := uint(0); ; shift += 7 {
  1302. if shift >= 64 {
  1303. return ErrIntOverflowStructs
  1304. }
  1305. if iNdEx >= l {
  1306. return io.ErrUnexpectedEOF
  1307. }
  1308. b := dAtA[iNdEx]
  1309. iNdEx++
  1310. v |= int(b&0x7F) << shift
  1311. if b < 0x80 {
  1312. break
  1313. }
  1314. }
  1315. m.RawInvalid = bool(v != 0)
  1316. case 8:
  1317. if wireType != 0 {
  1318. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  1319. }
  1320. var v int
  1321. for shift := uint(0); ; shift += 7 {
  1322. if shift >= 64 {
  1323. return ErrIntOverflowStructs
  1324. }
  1325. if iNdEx >= l {
  1326. return io.ErrUnexpectedEOF
  1327. }
  1328. b := dAtA[iNdEx]
  1329. iNdEx++
  1330. v |= int(b&0x7F) << shift
  1331. if b < 0x80 {
  1332. break
  1333. }
  1334. }
  1335. m.NoPermissions = bool(v != 0)
  1336. case 9:
  1337. if wireType != 2 {
  1338. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1339. }
  1340. var msglen int
  1341. for shift := uint(0); ; shift += 7 {
  1342. if shift >= 64 {
  1343. return ErrIntOverflowStructs
  1344. }
  1345. if iNdEx >= l {
  1346. return io.ErrUnexpectedEOF
  1347. }
  1348. b := dAtA[iNdEx]
  1349. iNdEx++
  1350. msglen |= int(b&0x7F) << shift
  1351. if b < 0x80 {
  1352. break
  1353. }
  1354. }
  1355. if msglen < 0 {
  1356. return ErrInvalidLengthStructs
  1357. }
  1358. postIndex := iNdEx + msglen
  1359. if postIndex < 0 {
  1360. return ErrInvalidLengthStructs
  1361. }
  1362. if postIndex > l {
  1363. return io.ErrUnexpectedEOF
  1364. }
  1365. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1366. return err
  1367. }
  1368. iNdEx = postIndex
  1369. case 10:
  1370. if wireType != 0 {
  1371. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  1372. }
  1373. m.Sequence = 0
  1374. for shift := uint(0); ; shift += 7 {
  1375. if shift >= 64 {
  1376. return ErrIntOverflowStructs
  1377. }
  1378. if iNdEx >= l {
  1379. return io.ErrUnexpectedEOF
  1380. }
  1381. b := dAtA[iNdEx]
  1382. iNdEx++
  1383. m.Sequence |= int64(b&0x7F) << shift
  1384. if b < 0x80 {
  1385. break
  1386. }
  1387. }
  1388. case 11:
  1389. if wireType != 0 {
  1390. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  1391. }
  1392. m.ModifiedNs = 0
  1393. for shift := uint(0); ; shift += 7 {
  1394. if shift >= 64 {
  1395. return ErrIntOverflowStructs
  1396. }
  1397. if iNdEx >= l {
  1398. return io.ErrUnexpectedEOF
  1399. }
  1400. b := dAtA[iNdEx]
  1401. iNdEx++
  1402. m.ModifiedNs |= int32(b&0x7F) << shift
  1403. if b < 0x80 {
  1404. break
  1405. }
  1406. }
  1407. case 12:
  1408. if wireType != 0 {
  1409. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  1410. }
  1411. m.ModifiedBy = 0
  1412. for shift := uint(0); ; shift += 7 {
  1413. if shift >= 64 {
  1414. return ErrIntOverflowStructs
  1415. }
  1416. if iNdEx >= l {
  1417. return io.ErrUnexpectedEOF
  1418. }
  1419. b := dAtA[iNdEx]
  1420. iNdEx++
  1421. m.ModifiedBy |= github_com_syncthing_syncthing_lib_protocol.ShortID(b&0x7F) << shift
  1422. if b < 0x80 {
  1423. break
  1424. }
  1425. }
  1426. case 13:
  1427. if wireType != 0 {
  1428. return fmt.Errorf("proto: wrong wireType = %d for field RawBlockSize", wireType)
  1429. }
  1430. m.RawBlockSize = 0
  1431. for shift := uint(0); ; shift += 7 {
  1432. if shift >= 64 {
  1433. return ErrIntOverflowStructs
  1434. }
  1435. if iNdEx >= l {
  1436. return io.ErrUnexpectedEOF
  1437. }
  1438. b := dAtA[iNdEx]
  1439. iNdEx++
  1440. m.RawBlockSize |= int32(b&0x7F) << shift
  1441. if b < 0x80 {
  1442. break
  1443. }
  1444. }
  1445. case 17:
  1446. if wireType != 2 {
  1447. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  1448. }
  1449. var stringLen uint64
  1450. for shift := uint(0); ; shift += 7 {
  1451. if shift >= 64 {
  1452. return ErrIntOverflowStructs
  1453. }
  1454. if iNdEx >= l {
  1455. return io.ErrUnexpectedEOF
  1456. }
  1457. b := dAtA[iNdEx]
  1458. iNdEx++
  1459. stringLen |= uint64(b&0x7F) << shift
  1460. if b < 0x80 {
  1461. break
  1462. }
  1463. }
  1464. intStringLen := int(stringLen)
  1465. if intStringLen < 0 {
  1466. return ErrInvalidLengthStructs
  1467. }
  1468. postIndex := iNdEx + intStringLen
  1469. if postIndex < 0 {
  1470. return ErrInvalidLengthStructs
  1471. }
  1472. if postIndex > l {
  1473. return io.ErrUnexpectedEOF
  1474. }
  1475. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  1476. iNdEx = postIndex
  1477. case 18:
  1478. if wireType != 2 {
  1479. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  1480. }
  1481. var byteLen int
  1482. for shift := uint(0); ; shift += 7 {
  1483. if shift >= 64 {
  1484. return ErrIntOverflowStructs
  1485. }
  1486. if iNdEx >= l {
  1487. return io.ErrUnexpectedEOF
  1488. }
  1489. b := dAtA[iNdEx]
  1490. iNdEx++
  1491. byteLen |= int(b&0x7F) << shift
  1492. if b < 0x80 {
  1493. break
  1494. }
  1495. }
  1496. if byteLen < 0 {
  1497. return ErrInvalidLengthStructs
  1498. }
  1499. postIndex := iNdEx + byteLen
  1500. if postIndex < 0 {
  1501. return ErrInvalidLengthStructs
  1502. }
  1503. if postIndex > l {
  1504. return io.ErrUnexpectedEOF
  1505. }
  1506. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  1507. if m.BlocksHash == nil {
  1508. m.BlocksHash = []byte{}
  1509. }
  1510. iNdEx = postIndex
  1511. case 1000:
  1512. if wireType != 0 {
  1513. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  1514. }
  1515. m.LocalFlags = 0
  1516. for shift := uint(0); ; shift += 7 {
  1517. if shift >= 64 {
  1518. return ErrIntOverflowStructs
  1519. }
  1520. if iNdEx >= l {
  1521. return io.ErrUnexpectedEOF
  1522. }
  1523. b := dAtA[iNdEx]
  1524. iNdEx++
  1525. m.LocalFlags |= uint32(b&0x7F) << shift
  1526. if b < 0x80 {
  1527. break
  1528. }
  1529. }
  1530. default:
  1531. iNdEx = preIndex
  1532. skippy, err := skipStructs(dAtA[iNdEx:])
  1533. if err != nil {
  1534. return err
  1535. }
  1536. if skippy < 0 {
  1537. return ErrInvalidLengthStructs
  1538. }
  1539. if (iNdEx + skippy) < 0 {
  1540. return ErrInvalidLengthStructs
  1541. }
  1542. if (iNdEx + skippy) > l {
  1543. return io.ErrUnexpectedEOF
  1544. }
  1545. iNdEx += skippy
  1546. }
  1547. }
  1548. if iNdEx > l {
  1549. return io.ErrUnexpectedEOF
  1550. }
  1551. return nil
  1552. }
  1553. func (m *BlockList) Unmarshal(dAtA []byte) error {
  1554. l := len(dAtA)
  1555. iNdEx := 0
  1556. for iNdEx < l {
  1557. preIndex := iNdEx
  1558. var wire uint64
  1559. for shift := uint(0); ; shift += 7 {
  1560. if shift >= 64 {
  1561. return ErrIntOverflowStructs
  1562. }
  1563. if iNdEx >= l {
  1564. return io.ErrUnexpectedEOF
  1565. }
  1566. b := dAtA[iNdEx]
  1567. iNdEx++
  1568. wire |= uint64(b&0x7F) << shift
  1569. if b < 0x80 {
  1570. break
  1571. }
  1572. }
  1573. fieldNum := int32(wire >> 3)
  1574. wireType := int(wire & 0x7)
  1575. if wireType == 4 {
  1576. return fmt.Errorf("proto: BlockList: wiretype end group for non-group")
  1577. }
  1578. if fieldNum <= 0 {
  1579. return fmt.Errorf("proto: BlockList: illegal tag %d (wire type %d)", fieldNum, wire)
  1580. }
  1581. switch fieldNum {
  1582. case 1:
  1583. if wireType != 2 {
  1584. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  1585. }
  1586. var msglen int
  1587. for shift := uint(0); ; shift += 7 {
  1588. if shift >= 64 {
  1589. return ErrIntOverflowStructs
  1590. }
  1591. if iNdEx >= l {
  1592. return io.ErrUnexpectedEOF
  1593. }
  1594. b := dAtA[iNdEx]
  1595. iNdEx++
  1596. msglen |= int(b&0x7F) << shift
  1597. if b < 0x80 {
  1598. break
  1599. }
  1600. }
  1601. if msglen < 0 {
  1602. return ErrInvalidLengthStructs
  1603. }
  1604. postIndex := iNdEx + msglen
  1605. if postIndex < 0 {
  1606. return ErrInvalidLengthStructs
  1607. }
  1608. if postIndex > l {
  1609. return io.ErrUnexpectedEOF
  1610. }
  1611. m.Blocks = append(m.Blocks, protocol.BlockInfo{})
  1612. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1613. return err
  1614. }
  1615. iNdEx = postIndex
  1616. default:
  1617. iNdEx = preIndex
  1618. skippy, err := skipStructs(dAtA[iNdEx:])
  1619. if err != nil {
  1620. return err
  1621. }
  1622. if skippy < 0 {
  1623. return ErrInvalidLengthStructs
  1624. }
  1625. if (iNdEx + skippy) < 0 {
  1626. return ErrInvalidLengthStructs
  1627. }
  1628. if (iNdEx + skippy) > l {
  1629. return io.ErrUnexpectedEOF
  1630. }
  1631. iNdEx += skippy
  1632. }
  1633. }
  1634. if iNdEx > l {
  1635. return io.ErrUnexpectedEOF
  1636. }
  1637. return nil
  1638. }
  1639. func (m *BlocksHashOnly) Unmarshal(dAtA []byte) error {
  1640. l := len(dAtA)
  1641. iNdEx := 0
  1642. for iNdEx < l {
  1643. preIndex := iNdEx
  1644. var wire uint64
  1645. for shift := uint(0); ; shift += 7 {
  1646. if shift >= 64 {
  1647. return ErrIntOverflowStructs
  1648. }
  1649. if iNdEx >= l {
  1650. return io.ErrUnexpectedEOF
  1651. }
  1652. b := dAtA[iNdEx]
  1653. iNdEx++
  1654. wire |= uint64(b&0x7F) << shift
  1655. if b < 0x80 {
  1656. break
  1657. }
  1658. }
  1659. fieldNum := int32(wire >> 3)
  1660. wireType := int(wire & 0x7)
  1661. if wireType == 4 {
  1662. return fmt.Errorf("proto: BlocksHashOnly: wiretype end group for non-group")
  1663. }
  1664. if fieldNum <= 0 {
  1665. return fmt.Errorf("proto: BlocksHashOnly: illegal tag %d (wire type %d)", fieldNum, wire)
  1666. }
  1667. switch fieldNum {
  1668. case 18:
  1669. if wireType != 2 {
  1670. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  1671. }
  1672. var byteLen int
  1673. for shift := uint(0); ; shift += 7 {
  1674. if shift >= 64 {
  1675. return ErrIntOverflowStructs
  1676. }
  1677. if iNdEx >= l {
  1678. return io.ErrUnexpectedEOF
  1679. }
  1680. b := dAtA[iNdEx]
  1681. iNdEx++
  1682. byteLen |= int(b&0x7F) << shift
  1683. if b < 0x80 {
  1684. break
  1685. }
  1686. }
  1687. if byteLen < 0 {
  1688. return ErrInvalidLengthStructs
  1689. }
  1690. postIndex := iNdEx + byteLen
  1691. if postIndex < 0 {
  1692. return ErrInvalidLengthStructs
  1693. }
  1694. if postIndex > l {
  1695. return io.ErrUnexpectedEOF
  1696. }
  1697. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  1698. if m.BlocksHash == nil {
  1699. m.BlocksHash = []byte{}
  1700. }
  1701. iNdEx = postIndex
  1702. default:
  1703. iNdEx = preIndex
  1704. skippy, err := skipStructs(dAtA[iNdEx:])
  1705. if err != nil {
  1706. return err
  1707. }
  1708. if skippy < 0 {
  1709. return ErrInvalidLengthStructs
  1710. }
  1711. if (iNdEx + skippy) < 0 {
  1712. return ErrInvalidLengthStructs
  1713. }
  1714. if (iNdEx + skippy) > l {
  1715. return io.ErrUnexpectedEOF
  1716. }
  1717. iNdEx += skippy
  1718. }
  1719. }
  1720. if iNdEx > l {
  1721. return io.ErrUnexpectedEOF
  1722. }
  1723. return nil
  1724. }
  1725. func (m *Counts) Unmarshal(dAtA []byte) error {
  1726. l := len(dAtA)
  1727. iNdEx := 0
  1728. for iNdEx < l {
  1729. preIndex := iNdEx
  1730. var wire uint64
  1731. for shift := uint(0); ; shift += 7 {
  1732. if shift >= 64 {
  1733. return ErrIntOverflowStructs
  1734. }
  1735. if iNdEx >= l {
  1736. return io.ErrUnexpectedEOF
  1737. }
  1738. b := dAtA[iNdEx]
  1739. iNdEx++
  1740. wire |= uint64(b&0x7F) << shift
  1741. if b < 0x80 {
  1742. break
  1743. }
  1744. }
  1745. fieldNum := int32(wire >> 3)
  1746. wireType := int(wire & 0x7)
  1747. if wireType == 4 {
  1748. return fmt.Errorf("proto: Counts: wiretype end group for non-group")
  1749. }
  1750. if fieldNum <= 0 {
  1751. return fmt.Errorf("proto: Counts: illegal tag %d (wire type %d)", fieldNum, wire)
  1752. }
  1753. switch fieldNum {
  1754. case 1:
  1755. if wireType != 0 {
  1756. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  1757. }
  1758. m.Files = 0
  1759. for shift := uint(0); ; shift += 7 {
  1760. if shift >= 64 {
  1761. return ErrIntOverflowStructs
  1762. }
  1763. if iNdEx >= l {
  1764. return io.ErrUnexpectedEOF
  1765. }
  1766. b := dAtA[iNdEx]
  1767. iNdEx++
  1768. m.Files |= int32(b&0x7F) << shift
  1769. if b < 0x80 {
  1770. break
  1771. }
  1772. }
  1773. case 2:
  1774. if wireType != 0 {
  1775. return fmt.Errorf("proto: wrong wireType = %d for field Directories", wireType)
  1776. }
  1777. m.Directories = 0
  1778. for shift := uint(0); ; shift += 7 {
  1779. if shift >= 64 {
  1780. return ErrIntOverflowStructs
  1781. }
  1782. if iNdEx >= l {
  1783. return io.ErrUnexpectedEOF
  1784. }
  1785. b := dAtA[iNdEx]
  1786. iNdEx++
  1787. m.Directories |= int32(b&0x7F) << shift
  1788. if b < 0x80 {
  1789. break
  1790. }
  1791. }
  1792. case 3:
  1793. if wireType != 0 {
  1794. return fmt.Errorf("proto: wrong wireType = %d for field Symlinks", wireType)
  1795. }
  1796. m.Symlinks = 0
  1797. for shift := uint(0); ; shift += 7 {
  1798. if shift >= 64 {
  1799. return ErrIntOverflowStructs
  1800. }
  1801. if iNdEx >= l {
  1802. return io.ErrUnexpectedEOF
  1803. }
  1804. b := dAtA[iNdEx]
  1805. iNdEx++
  1806. m.Symlinks |= int32(b&0x7F) << shift
  1807. if b < 0x80 {
  1808. break
  1809. }
  1810. }
  1811. case 4:
  1812. if wireType != 0 {
  1813. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1814. }
  1815. m.Deleted = 0
  1816. for shift := uint(0); ; shift += 7 {
  1817. if shift >= 64 {
  1818. return ErrIntOverflowStructs
  1819. }
  1820. if iNdEx >= l {
  1821. return io.ErrUnexpectedEOF
  1822. }
  1823. b := dAtA[iNdEx]
  1824. iNdEx++
  1825. m.Deleted |= int32(b&0x7F) << shift
  1826. if b < 0x80 {
  1827. break
  1828. }
  1829. }
  1830. case 5:
  1831. if wireType != 0 {
  1832. return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
  1833. }
  1834. m.Bytes = 0
  1835. for shift := uint(0); ; shift += 7 {
  1836. if shift >= 64 {
  1837. return ErrIntOverflowStructs
  1838. }
  1839. if iNdEx >= l {
  1840. return io.ErrUnexpectedEOF
  1841. }
  1842. b := dAtA[iNdEx]
  1843. iNdEx++
  1844. m.Bytes |= int64(b&0x7F) << shift
  1845. if b < 0x80 {
  1846. break
  1847. }
  1848. }
  1849. case 6:
  1850. if wireType != 0 {
  1851. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  1852. }
  1853. m.Sequence = 0
  1854. for shift := uint(0); ; shift += 7 {
  1855. if shift >= 64 {
  1856. return ErrIntOverflowStructs
  1857. }
  1858. if iNdEx >= l {
  1859. return io.ErrUnexpectedEOF
  1860. }
  1861. b := dAtA[iNdEx]
  1862. iNdEx++
  1863. m.Sequence |= int64(b&0x7F) << shift
  1864. if b < 0x80 {
  1865. break
  1866. }
  1867. }
  1868. case 17:
  1869. if wireType != 2 {
  1870. return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
  1871. }
  1872. var byteLen int
  1873. for shift := uint(0); ; shift += 7 {
  1874. if shift >= 64 {
  1875. return ErrIntOverflowStructs
  1876. }
  1877. if iNdEx >= l {
  1878. return io.ErrUnexpectedEOF
  1879. }
  1880. b := dAtA[iNdEx]
  1881. iNdEx++
  1882. byteLen |= int(b&0x7F) << shift
  1883. if b < 0x80 {
  1884. break
  1885. }
  1886. }
  1887. if byteLen < 0 {
  1888. return ErrInvalidLengthStructs
  1889. }
  1890. postIndex := iNdEx + byteLen
  1891. if postIndex < 0 {
  1892. return ErrInvalidLengthStructs
  1893. }
  1894. if postIndex > l {
  1895. return io.ErrUnexpectedEOF
  1896. }
  1897. m.DeviceID = append(m.DeviceID[:0], dAtA[iNdEx:postIndex]...)
  1898. if m.DeviceID == nil {
  1899. m.DeviceID = []byte{}
  1900. }
  1901. iNdEx = postIndex
  1902. case 18:
  1903. if wireType != 0 {
  1904. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  1905. }
  1906. m.LocalFlags = 0
  1907. for shift := uint(0); ; shift += 7 {
  1908. if shift >= 64 {
  1909. return ErrIntOverflowStructs
  1910. }
  1911. if iNdEx >= l {
  1912. return io.ErrUnexpectedEOF
  1913. }
  1914. b := dAtA[iNdEx]
  1915. iNdEx++
  1916. m.LocalFlags |= uint32(b&0x7F) << shift
  1917. if b < 0x80 {
  1918. break
  1919. }
  1920. }
  1921. default:
  1922. iNdEx = preIndex
  1923. skippy, err := skipStructs(dAtA[iNdEx:])
  1924. if err != nil {
  1925. return err
  1926. }
  1927. if skippy < 0 {
  1928. return ErrInvalidLengthStructs
  1929. }
  1930. if (iNdEx + skippy) < 0 {
  1931. return ErrInvalidLengthStructs
  1932. }
  1933. if (iNdEx + skippy) > l {
  1934. return io.ErrUnexpectedEOF
  1935. }
  1936. iNdEx += skippy
  1937. }
  1938. }
  1939. if iNdEx > l {
  1940. return io.ErrUnexpectedEOF
  1941. }
  1942. return nil
  1943. }
  1944. func (m *CountsSet) Unmarshal(dAtA []byte) error {
  1945. l := len(dAtA)
  1946. iNdEx := 0
  1947. for iNdEx < l {
  1948. preIndex := iNdEx
  1949. var wire uint64
  1950. for shift := uint(0); ; shift += 7 {
  1951. if shift >= 64 {
  1952. return ErrIntOverflowStructs
  1953. }
  1954. if iNdEx >= l {
  1955. return io.ErrUnexpectedEOF
  1956. }
  1957. b := dAtA[iNdEx]
  1958. iNdEx++
  1959. wire |= uint64(b&0x7F) << shift
  1960. if b < 0x80 {
  1961. break
  1962. }
  1963. }
  1964. fieldNum := int32(wire >> 3)
  1965. wireType := int(wire & 0x7)
  1966. if wireType == 4 {
  1967. return fmt.Errorf("proto: CountsSet: wiretype end group for non-group")
  1968. }
  1969. if fieldNum <= 0 {
  1970. return fmt.Errorf("proto: CountsSet: illegal tag %d (wire type %d)", fieldNum, wire)
  1971. }
  1972. switch fieldNum {
  1973. case 1:
  1974. if wireType != 2 {
  1975. return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType)
  1976. }
  1977. var msglen int
  1978. for shift := uint(0); ; shift += 7 {
  1979. if shift >= 64 {
  1980. return ErrIntOverflowStructs
  1981. }
  1982. if iNdEx >= l {
  1983. return io.ErrUnexpectedEOF
  1984. }
  1985. b := dAtA[iNdEx]
  1986. iNdEx++
  1987. msglen |= int(b&0x7F) << shift
  1988. if b < 0x80 {
  1989. break
  1990. }
  1991. }
  1992. if msglen < 0 {
  1993. return ErrInvalidLengthStructs
  1994. }
  1995. postIndex := iNdEx + msglen
  1996. if postIndex < 0 {
  1997. return ErrInvalidLengthStructs
  1998. }
  1999. if postIndex > l {
  2000. return io.ErrUnexpectedEOF
  2001. }
  2002. m.Counts = append(m.Counts, Counts{})
  2003. if err := m.Counts[len(m.Counts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2004. return err
  2005. }
  2006. iNdEx = postIndex
  2007. case 2:
  2008. if wireType != 0 {
  2009. return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
  2010. }
  2011. m.Created = 0
  2012. for shift := uint(0); ; shift += 7 {
  2013. if shift >= 64 {
  2014. return ErrIntOverflowStructs
  2015. }
  2016. if iNdEx >= l {
  2017. return io.ErrUnexpectedEOF
  2018. }
  2019. b := dAtA[iNdEx]
  2020. iNdEx++
  2021. m.Created |= int64(b&0x7F) << shift
  2022. if b < 0x80 {
  2023. break
  2024. }
  2025. }
  2026. default:
  2027. iNdEx = preIndex
  2028. skippy, err := skipStructs(dAtA[iNdEx:])
  2029. if err != nil {
  2030. return err
  2031. }
  2032. if skippy < 0 {
  2033. return ErrInvalidLengthStructs
  2034. }
  2035. if (iNdEx + skippy) < 0 {
  2036. return ErrInvalidLengthStructs
  2037. }
  2038. if (iNdEx + skippy) > l {
  2039. return io.ErrUnexpectedEOF
  2040. }
  2041. iNdEx += skippy
  2042. }
  2043. }
  2044. if iNdEx > l {
  2045. return io.ErrUnexpectedEOF
  2046. }
  2047. return nil
  2048. }
  2049. func skipStructs(dAtA []byte) (n int, err error) {
  2050. l := len(dAtA)
  2051. iNdEx := 0
  2052. depth := 0
  2053. for iNdEx < l {
  2054. var wire uint64
  2055. for shift := uint(0); ; shift += 7 {
  2056. if shift >= 64 {
  2057. return 0, ErrIntOverflowStructs
  2058. }
  2059. if iNdEx >= l {
  2060. return 0, io.ErrUnexpectedEOF
  2061. }
  2062. b := dAtA[iNdEx]
  2063. iNdEx++
  2064. wire |= (uint64(b) & 0x7F) << shift
  2065. if b < 0x80 {
  2066. break
  2067. }
  2068. }
  2069. wireType := int(wire & 0x7)
  2070. switch wireType {
  2071. case 0:
  2072. for shift := uint(0); ; shift += 7 {
  2073. if shift >= 64 {
  2074. return 0, ErrIntOverflowStructs
  2075. }
  2076. if iNdEx >= l {
  2077. return 0, io.ErrUnexpectedEOF
  2078. }
  2079. iNdEx++
  2080. if dAtA[iNdEx-1] < 0x80 {
  2081. break
  2082. }
  2083. }
  2084. case 1:
  2085. iNdEx += 8
  2086. case 2:
  2087. var length int
  2088. for shift := uint(0); ; shift += 7 {
  2089. if shift >= 64 {
  2090. return 0, ErrIntOverflowStructs
  2091. }
  2092. if iNdEx >= l {
  2093. return 0, io.ErrUnexpectedEOF
  2094. }
  2095. b := dAtA[iNdEx]
  2096. iNdEx++
  2097. length |= (int(b) & 0x7F) << shift
  2098. if b < 0x80 {
  2099. break
  2100. }
  2101. }
  2102. if length < 0 {
  2103. return 0, ErrInvalidLengthStructs
  2104. }
  2105. iNdEx += length
  2106. case 3:
  2107. depth++
  2108. case 4:
  2109. if depth == 0 {
  2110. return 0, ErrUnexpectedEndOfGroupStructs
  2111. }
  2112. depth--
  2113. case 5:
  2114. iNdEx += 4
  2115. default:
  2116. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2117. }
  2118. if iNdEx < 0 {
  2119. return 0, ErrInvalidLengthStructs
  2120. }
  2121. if depth == 0 {
  2122. return iNdEx, nil
  2123. }
  2124. }
  2125. return 0, io.ErrUnexpectedEOF
  2126. }
  2127. var (
  2128. ErrInvalidLengthStructs = fmt.Errorf("proto: negative length found during unmarshaling")
  2129. ErrIntOverflowStructs = fmt.Errorf("proto: integer overflow")
  2130. ErrUnexpectedEndOfGroupStructs = fmt.Errorf("proto: unexpected end of group")
  2131. )