structs.pb.go 54 KB

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