structs.pb.go 44 KB

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