1
0

structs.pb.go 57 KB

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