| 1 | // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. |
| 2 | // protoc-gen-go-vtproto version: v0.6.0 |
| 3 | // source: github.com/tonistiigi/fsutil/types/stat.proto |
| 4 | |
| 5 | package types |
| 6 | |
| 7 | import ( |
| 8 | fmt "fmt" |
| 9 | protohelpers "github.com/planetscale/vtprotobuf/protohelpers" |
| 10 | proto "google.golang.org/protobuf/proto" |
| 11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 12 | io "io" |
| 13 | unsafe "unsafe" |
| 14 | ) |
| 15 | |
| 16 | const ( |
| 17 | // Verify that this generated code is sufficiently up-to-date. |
| 18 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 19 | // Verify that runtime/protoimpl is sufficiently up-to-date. |
| 20 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 21 | ) |
| 22 | |
| 23 | func (m *Stat) CloneVT() *Stat { |
| 24 | if m == nil { |
| 25 | return (*Stat)(nil) |
| 26 | } |
| 27 | r := new(Stat) |
| 28 | r.Path = m.Path |
| 29 | r.Mode = m.Mode |
| 30 | r.Uid = m.Uid |
| 31 | r.Gid = m.Gid |
| 32 | r.Size = m.Size |
| 33 | r.ModTime = m.ModTime |
| 34 | r.Linkname = m.Linkname |
| 35 | r.Devmajor = m.Devmajor |
| 36 | r.Devminor = m.Devminor |
| 37 | if rhs := m.Xattrs; rhs != nil { |
| 38 | tmpContainer := make(map[string][]byte, len(rhs)) |
| 39 | for k, v := range rhs { |
| 40 | tmpBytes := make([]byte, len(v)) |
| 41 | copy(tmpBytes, v) |
| 42 | tmpContainer[k] = tmpBytes |
| 43 | } |
| 44 | r.Xattrs = tmpContainer |
| 45 | } |
| 46 | if len(m.unknownFields) > 0 { |
| 47 | r.unknownFields = make([]byte, len(m.unknownFields)) |
| 48 | copy(r.unknownFields, m.unknownFields) |
| 49 | } |
| 50 | return r |
| 51 | } |
| 52 | |
| 53 | func (m *Stat) CloneMessageVT() proto.Message { |
| 54 | return m.CloneVT() |
| 55 | } |
| 56 | |
| 57 | func (this *Stat) EqualVT(that *Stat) bool { |
| 58 | if this == that { |
| 59 | return true |
| 60 | } else if this == nil || that == nil { |
| 61 | return false |
| 62 | } |
| 63 | if this.Path != that.Path { |
| 64 | return false |
| 65 | } |
| 66 | if this.Mode != that.Mode { |
| 67 | return false |
| 68 | } |
| 69 | if this.Uid != that.Uid { |
| 70 | return false |
| 71 | } |
| 72 | if this.Gid != that.Gid { |
| 73 | return false |
| 74 | } |
| 75 | if this.Size != that.Size { |
| 76 | return false |
| 77 | } |
| 78 | if this.ModTime != that.ModTime { |
| 79 | return false |
| 80 | } |
| 81 | if this.Linkname != that.Linkname { |
| 82 | return false |
| 83 | } |
| 84 | if this.Devmajor != that.Devmajor { |
| 85 | return false |
| 86 | } |
| 87 | if this.Devminor != that.Devminor { |
| 88 | return false |
| 89 | } |
| 90 | if len(this.Xattrs) != len(that.Xattrs) { |
| 91 | return false |
| 92 | } |
| 93 | for i, vx := range this.Xattrs { |
| 94 | vy, ok := that.Xattrs[i] |
| 95 | if !ok { |
| 96 | return false |
| 97 | } |
| 98 | if string(vx) != string(vy) { |
| 99 | return false |
| 100 | } |
| 101 | } |
| 102 | return string(this.unknownFields) == string(that.unknownFields) |
| 103 | } |
| 104 | |
| 105 | func (this *Stat) EqualMessageVT(thatMsg proto.Message) bool { |
| 106 | that, ok := thatMsg.(*Stat) |
| 107 | if !ok { |
| 108 | return false |
| 109 | } |
| 110 | return this.EqualVT(that) |
| 111 | } |
| 112 | func (m *Stat) MarshalVT() (dAtA []byte, err error) { |
| 113 | if m == nil { |
| 114 | return nil, nil |
| 115 | } |
| 116 | size := m.SizeVT() |
| 117 | dAtA = make([]byte, size) |
| 118 | n, err := m.MarshalToSizedBufferVT(dAtA[:size]) |
| 119 | if err != nil { |
| 120 | return nil, err |
| 121 | } |
| 122 | return dAtA[:n], nil |
| 123 | } |
| 124 | |
| 125 | func (m *Stat) MarshalToVT(dAtA []byte) (int, error) { |
| 126 | size := m.SizeVT() |
| 127 | return m.MarshalToSizedBufferVT(dAtA[:size]) |
| 128 | } |
| 129 | |
| 130 | func (m *Stat) MarshalToSizedBufferVT(dAtA []byte) (int, error) { |
| 131 | if m == nil { |
| 132 | return 0, nil |
| 133 | } |
| 134 | i := len(dAtA) |
| 135 | _ = i |
| 136 | var l int |
| 137 | _ = l |
| 138 | if m.unknownFields != nil { |
| 139 | i -= len(m.unknownFields) |
| 140 | copy(dAtA[i:], m.unknownFields) |
| 141 | } |
| 142 | if len(m.Xattrs) > 0 { |
| 143 | for k := range m.Xattrs { |
| 144 | v := m.Xattrs[k] |
| 145 | baseI := i |
| 146 | i -= len(v) |
| 147 | copy(dAtA[i:], v) |
| 148 | i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) |
| 149 | i-- |
| 150 | dAtA[i] = 0x12 |
| 151 | i -= len(k) |
| 152 | copy(dAtA[i:], k) |
| 153 | i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) |
| 154 | i-- |
| 155 | dAtA[i] = 0xa |
| 156 | i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) |
| 157 | i-- |
| 158 | dAtA[i] = 0x52 |
| 159 | } |
| 160 | } |
| 161 | if m.Devminor != 0 { |
| 162 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Devminor)) |
| 163 | i-- |
| 164 | dAtA[i] = 0x48 |
| 165 | } |
| 166 | if m.Devmajor != 0 { |
| 167 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Devmajor)) |
| 168 | i-- |
| 169 | dAtA[i] = 0x40 |
| 170 | } |
| 171 | if len(m.Linkname) > 0 { |
| 172 | i -= len(m.Linkname) |
| 173 | copy(dAtA[i:], m.Linkname) |
| 174 | i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Linkname))) |
| 175 | i-- |
| 176 | dAtA[i] = 0x3a |
| 177 | } |
| 178 | if m.ModTime != 0 { |
| 179 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ModTime)) |
| 180 | i-- |
| 181 | dAtA[i] = 0x30 |
| 182 | } |
| 183 | if m.Size != 0 { |
| 184 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) |
| 185 | i-- |
| 186 | dAtA[i] = 0x28 |
| 187 | } |
| 188 | if m.Gid != 0 { |
| 189 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Gid)) |
| 190 | i-- |
| 191 | dAtA[i] = 0x20 |
| 192 | } |
| 193 | if m.Uid != 0 { |
| 194 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Uid)) |
| 195 | i-- |
| 196 | dAtA[i] = 0x18 |
| 197 | } |
| 198 | if m.Mode != 0 { |
| 199 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Mode)) |
| 200 | i-- |
| 201 | dAtA[i] = 0x10 |
| 202 | } |
| 203 | if len(m.Path) > 0 { |
| 204 | i -= len(m.Path) |
| 205 | copy(dAtA[i:], m.Path) |
| 206 | i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Path))) |
| 207 | i-- |
| 208 | dAtA[i] = 0xa |
| 209 | } |
| 210 | return len(dAtA) - i, nil |
| 211 | } |
| 212 | |
| 213 | func (m *Stat) MarshalVTStrict() (dAtA []byte, err error) { |
| 214 | if m == nil { |
| 215 | return nil, nil |
| 216 | } |
| 217 | size := m.SizeVT() |
| 218 | dAtA = make([]byte, size) |
| 219 | n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 220 | if err != nil { |
| 221 | return nil, err |
| 222 | } |
| 223 | return dAtA[:n], nil |
| 224 | } |
| 225 | |
| 226 | func (m *Stat) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 227 | size := m.SizeVT() |
| 228 | return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 229 | } |
| 230 | |
| 231 | func (m *Stat) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 232 | if m == nil { |
| 233 | return 0, nil |
| 234 | } |
| 235 | i := len(dAtA) |
| 236 | _ = i |
| 237 | var l int |
| 238 | _ = l |
| 239 | if m.unknownFields != nil { |
| 240 | i -= len(m.unknownFields) |
| 241 | copy(dAtA[i:], m.unknownFields) |
| 242 | } |
| 243 | if len(m.Xattrs) > 0 { |
| 244 | for k := range m.Xattrs { |
| 245 | v := m.Xattrs[k] |
| 246 | baseI := i |
| 247 | i -= len(v) |
| 248 | copy(dAtA[i:], v) |
| 249 | i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) |
| 250 | i-- |
| 251 | dAtA[i] = 0x12 |
| 252 | i -= len(k) |
| 253 | copy(dAtA[i:], k) |
| 254 | i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) |
| 255 | i-- |
| 256 | dAtA[i] = 0xa |
| 257 | i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) |
| 258 | i-- |
| 259 | dAtA[i] = 0x52 |
| 260 | } |
| 261 | } |
| 262 | if m.Devminor != 0 { |
| 263 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Devminor)) |
| 264 | i-- |
| 265 | dAtA[i] = 0x48 |
| 266 | } |
| 267 | if m.Devmajor != 0 { |
| 268 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Devmajor)) |
| 269 | i-- |
| 270 | dAtA[i] = 0x40 |
| 271 | } |
| 272 | if len(m.Linkname) > 0 { |
| 273 | i -= len(m.Linkname) |
| 274 | copy(dAtA[i:], m.Linkname) |
| 275 | i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Linkname))) |
| 276 | i-- |
| 277 | dAtA[i] = 0x3a |
| 278 | } |
| 279 | if m.ModTime != 0 { |
| 280 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ModTime)) |
| 281 | i-- |
| 282 | dAtA[i] = 0x30 |
| 283 | } |
| 284 | if m.Size != 0 { |
| 285 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) |
| 286 | i-- |
| 287 | dAtA[i] = 0x28 |
| 288 | } |
| 289 | if m.Gid != 0 { |
| 290 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Gid)) |
| 291 | i-- |
| 292 | dAtA[i] = 0x20 |
| 293 | } |
| 294 | if m.Uid != 0 { |
| 295 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Uid)) |
| 296 | i-- |
| 297 | dAtA[i] = 0x18 |
| 298 | } |
| 299 | if m.Mode != 0 { |
| 300 | i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Mode)) |
| 301 | i-- |
| 302 | dAtA[i] = 0x10 |
| 303 | } |
| 304 | if len(m.Path) > 0 { |
| 305 | i -= len(m.Path) |
| 306 | copy(dAtA[i:], m.Path) |
| 307 | i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Path))) |
| 308 | i-- |
| 309 | dAtA[i] = 0xa |
| 310 | } |
| 311 | return len(dAtA) - i, nil |
| 312 | } |
| 313 | |
| 314 | func (m *Stat) SizeVT() (n int) { |
| 315 | if m == nil { |
| 316 | return 0 |
| 317 | } |
| 318 | var l int |
| 319 | _ = l |
| 320 | l = len(m.Path) |
| 321 | if l > 0 { |
| 322 | n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 323 | } |
| 324 | if m.Mode != 0 { |
| 325 | n += 1 + protohelpers.SizeOfVarint(uint64(m.Mode)) |
| 326 | } |
| 327 | if m.Uid != 0 { |
| 328 | n += 1 + protohelpers.SizeOfVarint(uint64(m.Uid)) |
| 329 | } |
| 330 | if m.Gid != 0 { |
| 331 | n += 1 + protohelpers.SizeOfVarint(uint64(m.Gid)) |
| 332 | } |
| 333 | if m.Size != 0 { |
| 334 | n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) |
| 335 | } |
| 336 | if m.ModTime != 0 { |
| 337 | n += 1 + protohelpers.SizeOfVarint(uint64(m.ModTime)) |
| 338 | } |
| 339 | l = len(m.Linkname) |
| 340 | if l > 0 { |
| 341 | n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 342 | } |
| 343 | if m.Devmajor != 0 { |
| 344 | n += 1 + protohelpers.SizeOfVarint(uint64(m.Devmajor)) |
| 345 | } |
| 346 | if m.Devminor != 0 { |
| 347 | n += 1 + protohelpers.SizeOfVarint(uint64(m.Devminor)) |
| 348 | } |
| 349 | if len(m.Xattrs) > 0 { |
| 350 | for k, v := range m.Xattrs { |
| 351 | _ = k |
| 352 | _ = v |
| 353 | l = 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) |
| 354 | mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l |
| 355 | n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) |
| 356 | } |
| 357 | } |
| 358 | n += len(m.unknownFields) |
| 359 | return n |
| 360 | } |
| 361 | |
| 362 | func (m *Stat) UnmarshalVT(dAtA []byte) error { |
| 363 | l := len(dAtA) |
| 364 | iNdEx := 0 |
| 365 | for iNdEx < l { |
| 366 | preIndex := iNdEx |
| 367 | var wire uint64 |
| 368 | for shift := uint(0); ; shift += 7 { |
| 369 | if shift >= 64 { |
| 370 | return protohelpers.ErrIntOverflow |
| 371 | } |
| 372 | if iNdEx >= l { |
| 373 | return io.ErrUnexpectedEOF |
| 374 | } |
| 375 | b := dAtA[iNdEx] |
| 376 | iNdEx++ |
| 377 | wire |= uint64(b&0x7F) << shift |
| 378 | if b < 0x80 { |
| 379 | break |
| 380 | } |
| 381 | } |
| 382 | fieldNum := int32(wire >> 3) |
| 383 | wireType := int(wire & 0x7) |
| 384 | if wireType == 4 { |
| 385 | return fmt.Errorf("proto: Stat: wiretype end group for non-group") |
| 386 | } |
| 387 | if fieldNum <= 0 { |
| 388 | return fmt.Errorf("proto: Stat: illegal tag %d (wire type %d)", fieldNum, wire) |
| 389 | } |
| 390 | switch fieldNum { |
| 391 | case 1: |
| 392 | if wireType != 2 { |
| 393 | return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) |
| 394 | } |
| 395 | var stringLen uint64 |
| 396 | for shift := uint(0); ; shift += 7 { |
| 397 | if shift >= 64 { |
| 398 | return protohelpers.ErrIntOverflow |
| 399 | } |
| 400 | if iNdEx >= l { |
| 401 | return io.ErrUnexpectedEOF |
| 402 | } |
| 403 | b := dAtA[iNdEx] |
| 404 | iNdEx++ |
| 405 | stringLen |= uint64(b&0x7F) << shift |
| 406 | if b < 0x80 { |
| 407 | break |
| 408 | } |
| 409 | } |
| 410 | intStringLen := int(stringLen) |
| 411 | if intStringLen < 0 { |
| 412 | return protohelpers.ErrInvalidLength |
| 413 | } |
| 414 | postIndex := iNdEx + intStringLen |
| 415 | if postIndex < 0 { |
| 416 | return protohelpers.ErrInvalidLength |
| 417 | } |
| 418 | if postIndex > l { |
| 419 | return io.ErrUnexpectedEOF |
| 420 | } |
| 421 | m.Path = string(dAtA[iNdEx:postIndex]) |
| 422 | iNdEx = postIndex |
| 423 | case 2: |
| 424 | if wireType != 0 { |
| 425 | return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) |
| 426 | } |
| 427 | m.Mode = 0 |
| 428 | for shift := uint(0); ; shift += 7 { |
| 429 | if shift >= 64 { |
| 430 | return protohelpers.ErrIntOverflow |
| 431 | } |
| 432 | if iNdEx >= l { |
| 433 | return io.ErrUnexpectedEOF |
| 434 | } |
| 435 | b := dAtA[iNdEx] |
| 436 | iNdEx++ |
| 437 | m.Mode |= uint32(b&0x7F) << shift |
| 438 | if b < 0x80 { |
| 439 | break |
| 440 | } |
| 441 | } |
| 442 | case 3: |
| 443 | if wireType != 0 { |
| 444 | return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) |
| 445 | } |
| 446 | m.Uid = 0 |
| 447 | for shift := uint(0); ; shift += 7 { |
| 448 | if shift >= 64 { |
| 449 | return protohelpers.ErrIntOverflow |
| 450 | } |
| 451 | if iNdEx >= l { |
| 452 | return io.ErrUnexpectedEOF |
| 453 | } |
| 454 | b := dAtA[iNdEx] |
| 455 | iNdEx++ |
| 456 | m.Uid |= uint32(b&0x7F) << shift |
| 457 | if b < 0x80 { |
| 458 | break |
| 459 | } |
| 460 | } |
| 461 | case 4: |
| 462 | if wireType != 0 { |
| 463 | return fmt.Errorf("proto: wrong wireType = %d for field Gid", wireType) |
| 464 | } |
| 465 | m.Gid = 0 |
| 466 | for shift := uint(0); ; shift += 7 { |
| 467 | if shift >= 64 { |
| 468 | return protohelpers.ErrIntOverflow |
| 469 | } |
| 470 | if iNdEx >= l { |
| 471 | return io.ErrUnexpectedEOF |
| 472 | } |
| 473 | b := dAtA[iNdEx] |
| 474 | iNdEx++ |
| 475 | m.Gid |= uint32(b&0x7F) << shift |
| 476 | if b < 0x80 { |
| 477 | break |
| 478 | } |
| 479 | } |
| 480 | case 5: |
| 481 | if wireType != 0 { |
| 482 | return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) |
| 483 | } |
| 484 | m.Size = 0 |
| 485 | for shift := uint(0); ; shift += 7 { |
| 486 | if shift >= 64 { |
| 487 | return protohelpers.ErrIntOverflow |
| 488 | } |
| 489 | if iNdEx >= l { |
| 490 | return io.ErrUnexpectedEOF |
| 491 | } |
| 492 | b := dAtA[iNdEx] |
| 493 | iNdEx++ |
| 494 | m.Size |= int64(b&0x7F) << shift |
| 495 | if b < 0x80 { |
| 496 | break |
| 497 | } |
| 498 | } |
| 499 | case 6: |
| 500 | if wireType != 0 { |
| 501 | return fmt.Errorf("proto: wrong wireType = %d for field ModTime", wireType) |
| 502 | } |
| 503 | m.ModTime = 0 |
| 504 | for shift := uint(0); ; shift += 7 { |
| 505 | if shift >= 64 { |
| 506 | return protohelpers.ErrIntOverflow |
| 507 | } |
| 508 | if iNdEx >= l { |
| 509 | return io.ErrUnexpectedEOF |
| 510 | } |
| 511 | b := dAtA[iNdEx] |
| 512 | iNdEx++ |
| 513 | m.ModTime |= int64(b&0x7F) << shift |
| 514 | if b < 0x80 { |
| 515 | break |
| 516 | } |
| 517 | } |
| 518 | case 7: |
| 519 | if wireType != 2 { |
| 520 | return fmt.Errorf("proto: wrong wireType = %d for field Linkname", wireType) |
| 521 | } |
| 522 | var stringLen uint64 |
| 523 | for shift := uint(0); ; shift += 7 { |
| 524 | if shift >= 64 { |
| 525 | return protohelpers.ErrIntOverflow |
| 526 | } |
| 527 | if iNdEx >= l { |
| 528 | return io.ErrUnexpectedEOF |
| 529 | } |
| 530 | b := dAtA[iNdEx] |
| 531 | iNdEx++ |
| 532 | stringLen |= uint64(b&0x7F) << shift |
| 533 | if b < 0x80 { |
| 534 | break |
| 535 | } |
| 536 | } |
| 537 | intStringLen := int(stringLen) |
| 538 | if intStringLen < 0 { |
| 539 | return protohelpers.ErrInvalidLength |
| 540 | } |
| 541 | postIndex := iNdEx + intStringLen |
| 542 | if postIndex < 0 { |
| 543 | return protohelpers.ErrInvalidLength |
| 544 | } |
| 545 | if postIndex > l { |
| 546 | return io.ErrUnexpectedEOF |
| 547 | } |
| 548 | m.Linkname = string(dAtA[iNdEx:postIndex]) |
| 549 | iNdEx = postIndex |
| 550 | case 8: |
| 551 | if wireType != 0 { |
| 552 | return fmt.Errorf("proto: wrong wireType = %d for field Devmajor", wireType) |
| 553 | } |
| 554 | m.Devmajor = 0 |
| 555 | for shift := uint(0); ; shift += 7 { |
| 556 | if shift >= 64 { |
| 557 | return protohelpers.ErrIntOverflow |
| 558 | } |
| 559 | if iNdEx >= l { |
| 560 | return io.ErrUnexpectedEOF |
| 561 | } |
| 562 | b := dAtA[iNdEx] |
| 563 | iNdEx++ |
| 564 | m.Devmajor |= int64(b&0x7F) << shift |
| 565 | if b < 0x80 { |
| 566 | break |
| 567 | } |
| 568 | } |
| 569 | case 9: |
| 570 | if wireType != 0 { |
| 571 | return fmt.Errorf("proto: wrong wireType = %d for field Devminor", wireType) |
| 572 | } |
| 573 | m.Devminor = 0 |
| 574 | for shift := uint(0); ; shift += 7 { |
| 575 | if shift >= 64 { |
| 576 | return protohelpers.ErrIntOverflow |
| 577 | } |
| 578 | if iNdEx >= l { |
| 579 | return io.ErrUnexpectedEOF |
| 580 | } |
| 581 | b := dAtA[iNdEx] |
| 582 | iNdEx++ |
| 583 | m.Devminor |= int64(b&0x7F) << shift |
| 584 | if b < 0x80 { |
| 585 | break |
| 586 | } |
| 587 | } |
| 588 | case 10: |
| 589 | if wireType != 2 { |
| 590 | return fmt.Errorf("proto: wrong wireType = %d for field Xattrs", wireType) |
| 591 | } |
| 592 | var msglen int |
| 593 | for shift := uint(0); ; shift += 7 { |
| 594 | if shift >= 64 { |
| 595 | return protohelpers.ErrIntOverflow |
| 596 | } |
| 597 | if iNdEx >= l { |
| 598 | return io.ErrUnexpectedEOF |
| 599 | } |
| 600 | b := dAtA[iNdEx] |
| 601 | iNdEx++ |
| 602 | msglen |= int(b&0x7F) << shift |
| 603 | if b < 0x80 { |
| 604 | break |
| 605 | } |
| 606 | } |
| 607 | if msglen < 0 { |
| 608 | return protohelpers.ErrInvalidLength |
| 609 | } |
| 610 | postIndex := iNdEx + msglen |
| 611 | if postIndex < 0 { |
| 612 | return protohelpers.ErrInvalidLength |
| 613 | } |
| 614 | if postIndex > l { |
| 615 | return io.ErrUnexpectedEOF |
| 616 | } |
| 617 | if m.Xattrs == nil { |
| 618 | m.Xattrs = make(map[string][]byte) |
| 619 | } |
| 620 | var mapkey string |
| 621 | var mapvalue []byte |
| 622 | for iNdEx < postIndex { |
| 623 | entryPreIndex := iNdEx |
| 624 | var wire uint64 |
| 625 | for shift := uint(0); ; shift += 7 { |
| 626 | if shift >= 64 { |
| 627 | return protohelpers.ErrIntOverflow |
| 628 | } |
| 629 | if iNdEx >= l { |
| 630 | return io.ErrUnexpectedEOF |
| 631 | } |
| 632 | b := dAtA[iNdEx] |
| 633 | iNdEx++ |
| 634 | wire |= uint64(b&0x7F) << shift |
| 635 | if b < 0x80 { |
| 636 | break |
| 637 | } |
| 638 | } |
| 639 | fieldNum := int32(wire >> 3) |
| 640 | if fieldNum == 1 { |
| 641 | var stringLenmapkey uint64 |
| 642 | for shift := uint(0); ; shift += 7 { |
| 643 | if shift >= 64 { |
| 644 | return protohelpers.ErrIntOverflow |
| 645 | } |
| 646 | if iNdEx >= l { |
| 647 | return io.ErrUnexpectedEOF |
| 648 | } |
| 649 | b := dAtA[iNdEx] |
| 650 | iNdEx++ |
| 651 | stringLenmapkey |= uint64(b&0x7F) << shift |
| 652 | if b < 0x80 { |
| 653 | break |
| 654 | } |
| 655 | } |
| 656 | intStringLenmapkey := int(stringLenmapkey) |
| 657 | if intStringLenmapkey < 0 { |
| 658 | return protohelpers.ErrInvalidLength |
| 659 | } |
| 660 | postStringIndexmapkey := iNdEx + intStringLenmapkey |
| 661 | if postStringIndexmapkey < 0 { |
| 662 | return protohelpers.ErrInvalidLength |
| 663 | } |
| 664 | if postStringIndexmapkey > l { |
| 665 | return io.ErrUnexpectedEOF |
| 666 | } |
| 667 | mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) |
| 668 | iNdEx = postStringIndexmapkey |
| 669 | } else if fieldNum == 2 { |
| 670 | var mapbyteLen uint64 |
| 671 | for shift := uint(0); ; shift += 7 { |
| 672 | if shift >= 64 { |
| 673 | return protohelpers.ErrIntOverflow |
| 674 | } |
| 675 | if iNdEx >= l { |
| 676 | return io.ErrUnexpectedEOF |
| 677 | } |
| 678 | b := dAtA[iNdEx] |
| 679 | iNdEx++ |
| 680 | mapbyteLen |= uint64(b&0x7F) << shift |
| 681 | if b < 0x80 { |
| 682 | break |
| 683 | } |
| 684 | } |
| 685 | intMapbyteLen := int(mapbyteLen) |
| 686 | if intMapbyteLen < 0 { |
| 687 | return protohelpers.ErrInvalidLength |
| 688 | } |
| 689 | postbytesIndex := iNdEx + intMapbyteLen |
| 690 | if postbytesIndex < 0 { |
| 691 | return protohelpers.ErrInvalidLength |
| 692 | } |
| 693 | if postbytesIndex > l { |
| 694 | return io.ErrUnexpectedEOF |
| 695 | } |
| 696 | mapvalue = make([]byte, mapbyteLen) |
| 697 | copy(mapvalue, dAtA[iNdEx:postbytesIndex]) |
| 698 | iNdEx = postbytesIndex |
| 699 | } else { |
| 700 | iNdEx = entryPreIndex |
| 701 | skippy, err := protohelpers.Skip(dAtA[iNdEx:]) |
| 702 | if err != nil { |
| 703 | return err |
| 704 | } |
| 705 | if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 706 | return protohelpers.ErrInvalidLength |
| 707 | } |
| 708 | if (iNdEx + skippy) > postIndex { |
| 709 | return io.ErrUnexpectedEOF |
| 710 | } |
| 711 | iNdEx += skippy |
| 712 | } |
| 713 | } |
| 714 | m.Xattrs[mapkey] = mapvalue |
| 715 | iNdEx = postIndex |
| 716 | default: |
| 717 | iNdEx = preIndex |
| 718 | skippy, err := protohelpers.Skip(dAtA[iNdEx:]) |
| 719 | if err != nil { |
| 720 | return err |
| 721 | } |
| 722 | if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 723 | return protohelpers.ErrInvalidLength |
| 724 | } |
| 725 | if (iNdEx + skippy) > l { |
| 726 | return io.ErrUnexpectedEOF |
| 727 | } |
| 728 | m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) |
| 729 | iNdEx += skippy |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | if iNdEx > l { |
| 734 | return io.ErrUnexpectedEOF |
| 735 | } |
| 736 | return nil |
| 737 | } |
| 738 | func (m *Stat) UnmarshalVTUnsafe(dAtA []byte) error { |
| 739 | l := len(dAtA) |
| 740 | iNdEx := 0 |
| 741 | for iNdEx < l { |
| 742 | preIndex := iNdEx |
| 743 | var wire uint64 |
| 744 | for shift := uint(0); ; shift += 7 { |
| 745 | if shift >= 64 { |
| 746 | return protohelpers.ErrIntOverflow |
| 747 | } |
| 748 | if iNdEx >= l { |
| 749 | return io.ErrUnexpectedEOF |
| 750 | } |
| 751 | b := dAtA[iNdEx] |
| 752 | iNdEx++ |
| 753 | wire |= uint64(b&0x7F) << shift |
| 754 | if b < 0x80 { |
| 755 | break |
| 756 | } |
| 757 | } |
| 758 | fieldNum := int32(wire >> 3) |
| 759 | wireType := int(wire & 0x7) |
| 760 | if wireType == 4 { |
| 761 | return fmt.Errorf("proto: Stat: wiretype end group for non-group") |
| 762 | } |
| 763 | if fieldNum <= 0 { |
| 764 | return fmt.Errorf("proto: Stat: illegal tag %d (wire type %d)", fieldNum, wire) |
| 765 | } |
| 766 | switch fieldNum { |
| 767 | case 1: |
| 768 | if wireType != 2 { |
| 769 | return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) |
| 770 | } |
| 771 | var stringLen uint64 |
| 772 | for shift := uint(0); ; shift += 7 { |
| 773 | if shift >= 64 { |
| 774 | return protohelpers.ErrIntOverflow |
| 775 | } |
| 776 | if iNdEx >= l { |
| 777 | return io.ErrUnexpectedEOF |
| 778 | } |
| 779 | b := dAtA[iNdEx] |
| 780 | iNdEx++ |
| 781 | stringLen |= uint64(b&0x7F) << shift |
| 782 | if b < 0x80 { |
| 783 | break |
| 784 | } |
| 785 | } |
| 786 | intStringLen := int(stringLen) |
| 787 | if intStringLen < 0 { |
| 788 | return protohelpers.ErrInvalidLength |
| 789 | } |
| 790 | postIndex := iNdEx + intStringLen |
| 791 | if postIndex < 0 { |
| 792 | return protohelpers.ErrInvalidLength |
| 793 | } |
| 794 | if postIndex > l { |
| 795 | return io.ErrUnexpectedEOF |
| 796 | } |
| 797 | var stringValue string |
| 798 | if intStringLen > 0 { |
| 799 | stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) |
| 800 | } |
| 801 | m.Path = stringValue |
| 802 | iNdEx = postIndex |
| 803 | case 2: |
| 804 | if wireType != 0 { |
| 805 | return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) |
| 806 | } |
| 807 | m.Mode = 0 |
| 808 | for shift := uint(0); ; shift += 7 { |
| 809 | if shift >= 64 { |
| 810 | return protohelpers.ErrIntOverflow |
| 811 | } |
| 812 | if iNdEx >= l { |
| 813 | return io.ErrUnexpectedEOF |
| 814 | } |
| 815 | b := dAtA[iNdEx] |
| 816 | iNdEx++ |
| 817 | m.Mode |= uint32(b&0x7F) << shift |
| 818 | if b < 0x80 { |
| 819 | break |
| 820 | } |
| 821 | } |
| 822 | case 3: |
| 823 | if wireType != 0 { |
| 824 | return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) |
| 825 | } |
| 826 | m.Uid = 0 |
| 827 | for shift := uint(0); ; shift += 7 { |
| 828 | if shift >= 64 { |
| 829 | return protohelpers.ErrIntOverflow |
| 830 | } |
| 831 | if iNdEx >= l { |
| 832 | return io.ErrUnexpectedEOF |
| 833 | } |
| 834 | b := dAtA[iNdEx] |
| 835 | iNdEx++ |
| 836 | m.Uid |= uint32(b&0x7F) << shift |
| 837 | if b < 0x80 { |
| 838 | break |
| 839 | } |
| 840 | } |
| 841 | case 4: |
| 842 | if wireType != 0 { |
| 843 | return fmt.Errorf("proto: wrong wireType = %d for field Gid", wireType) |
| 844 | } |
| 845 | m.Gid = 0 |
| 846 | for shift := uint(0); ; shift += 7 { |
| 847 | if shift >= 64 { |
| 848 | return protohelpers.ErrIntOverflow |
| 849 | } |
| 850 | if iNdEx >= l { |
| 851 | return io.ErrUnexpectedEOF |
| 852 | } |
| 853 | b := dAtA[iNdEx] |
| 854 | iNdEx++ |
| 855 | m.Gid |= uint32(b&0x7F) << shift |
| 856 | if b < 0x80 { |
| 857 | break |
| 858 | } |
| 859 | } |
| 860 | case 5: |
| 861 | if wireType != 0 { |
| 862 | return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) |
| 863 | } |
| 864 | m.Size = 0 |
| 865 | for shift := uint(0); ; shift += 7 { |
| 866 | if shift >= 64 { |
| 867 | return protohelpers.ErrIntOverflow |
| 868 | } |
| 869 | if iNdEx >= l { |
| 870 | return io.ErrUnexpectedEOF |
| 871 | } |
| 872 | b := dAtA[iNdEx] |
| 873 | iNdEx++ |
| 874 | m.Size |= int64(b&0x7F) << shift |
| 875 | if b < 0x80 { |
| 876 | break |
| 877 | } |
| 878 | } |
| 879 | case 6: |
| 880 | if wireType != 0 { |
| 881 | return fmt.Errorf("proto: wrong wireType = %d for field ModTime", wireType) |
| 882 | } |
| 883 | m.ModTime = 0 |
| 884 | for shift := uint(0); ; shift += 7 { |
| 885 | if shift >= 64 { |
| 886 | return protohelpers.ErrIntOverflow |
| 887 | } |
| 888 | if iNdEx >= l { |
| 889 | return io.ErrUnexpectedEOF |
| 890 | } |
| 891 | b := dAtA[iNdEx] |
| 892 | iNdEx++ |
| 893 | m.ModTime |= int64(b&0x7F) << shift |
| 894 | if b < 0x80 { |
| 895 | break |
| 896 | } |
| 897 | } |
| 898 | case 7: |
| 899 | if wireType != 2 { |
| 900 | return fmt.Errorf("proto: wrong wireType = %d for field Linkname", wireType) |
| 901 | } |
| 902 | var stringLen uint64 |
| 903 | for shift := uint(0); ; shift += 7 { |
| 904 | if shift >= 64 { |
| 905 | return protohelpers.ErrIntOverflow |
| 906 | } |
| 907 | if iNdEx >= l { |
| 908 | return io.ErrUnexpectedEOF |
| 909 | } |
| 910 | b := dAtA[iNdEx] |
| 911 | iNdEx++ |
| 912 | stringLen |= uint64(b&0x7F) << shift |
| 913 | if b < 0x80 { |
| 914 | break |
| 915 | } |
| 916 | } |
| 917 | intStringLen := int(stringLen) |
| 918 | if intStringLen < 0 { |
| 919 | return protohelpers.ErrInvalidLength |
| 920 | } |
| 921 | postIndex := iNdEx + intStringLen |
| 922 | if postIndex < 0 { |
| 923 | return protohelpers.ErrInvalidLength |
| 924 | } |
| 925 | if postIndex > l { |
| 926 | return io.ErrUnexpectedEOF |
| 927 | } |
| 928 | var stringValue string |
| 929 | if intStringLen > 0 { |
| 930 | stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) |
| 931 | } |
| 932 | m.Linkname = stringValue |
| 933 | iNdEx = postIndex |
| 934 | case 8: |
| 935 | if wireType != 0 { |
| 936 | return fmt.Errorf("proto: wrong wireType = %d for field Devmajor", wireType) |
| 937 | } |
| 938 | m.Devmajor = 0 |
| 939 | for shift := uint(0); ; shift += 7 { |
| 940 | if shift >= 64 { |
| 941 | return protohelpers.ErrIntOverflow |
| 942 | } |
| 943 | if iNdEx >= l { |
| 944 | return io.ErrUnexpectedEOF |
| 945 | } |
| 946 | b := dAtA[iNdEx] |
| 947 | iNdEx++ |
| 948 | m.Devmajor |= int64(b&0x7F) << shift |
| 949 | if b < 0x80 { |
| 950 | break |
| 951 | } |
| 952 | } |
| 953 | case 9: |
| 954 | if wireType != 0 { |
| 955 | return fmt.Errorf("proto: wrong wireType = %d for field Devminor", wireType) |
| 956 | } |
| 957 | m.Devminor = 0 |
| 958 | for shift := uint(0); ; shift += 7 { |
| 959 | if shift >= 64 { |
| 960 | return protohelpers.ErrIntOverflow |
| 961 | } |
| 962 | if iNdEx >= l { |
| 963 | return io.ErrUnexpectedEOF |
| 964 | } |
| 965 | b := dAtA[iNdEx] |
| 966 | iNdEx++ |
| 967 | m.Devminor |= int64(b&0x7F) << shift |
| 968 | if b < 0x80 { |
| 969 | break |
| 970 | } |
| 971 | } |
| 972 | case 10: |
| 973 | if wireType != 2 { |
| 974 | return fmt.Errorf("proto: wrong wireType = %d for field Xattrs", wireType) |
| 975 | } |
| 976 | var msglen int |
| 977 | for shift := uint(0); ; shift += 7 { |
| 978 | if shift >= 64 { |
| 979 | return protohelpers.ErrIntOverflow |
| 980 | } |
| 981 | if iNdEx >= l { |
| 982 | return io.ErrUnexpectedEOF |
| 983 | } |
| 984 | b := dAtA[iNdEx] |
| 985 | iNdEx++ |
| 986 | msglen |= int(b&0x7F) << shift |
| 987 | if b < 0x80 { |
| 988 | break |
| 989 | } |
| 990 | } |
| 991 | if msglen < 0 { |
| 992 | return protohelpers.ErrInvalidLength |
| 993 | } |
| 994 | postIndex := iNdEx + msglen |
| 995 | if postIndex < 0 { |
| 996 | return protohelpers.ErrInvalidLength |
| 997 | } |
| 998 | if postIndex > l { |
| 999 | return io.ErrUnexpectedEOF |
| 1000 | } |
| 1001 | if m.Xattrs == nil { |
| 1002 | m.Xattrs = make(map[string][]byte) |
| 1003 | } |
| 1004 | var mapkey string |
| 1005 | var mapvalue []byte |
| 1006 | for iNdEx < postIndex { |
| 1007 | entryPreIndex := iNdEx |
| 1008 | var wire uint64 |
| 1009 | for shift := uint(0); ; shift += 7 { |
| 1010 | if shift >= 64 { |
| 1011 | return protohelpers.ErrIntOverflow |
| 1012 | } |
| 1013 | if iNdEx >= l { |
| 1014 | return io.ErrUnexpectedEOF |
| 1015 | } |
| 1016 | b := dAtA[iNdEx] |
| 1017 | iNdEx++ |
| 1018 | wire |= uint64(b&0x7F) << shift |
| 1019 | if b < 0x80 { |
| 1020 | break |
| 1021 | } |
| 1022 | } |
| 1023 | fieldNum := int32(wire >> 3) |
| 1024 | if fieldNum == 1 { |
| 1025 | var stringLenmapkey uint64 |
| 1026 | for shift := uint(0); ; shift += 7 { |
| 1027 | if shift >= 64 { |
| 1028 | return protohelpers.ErrIntOverflow |
| 1029 | } |
| 1030 | if iNdEx >= l { |
| 1031 | return io.ErrUnexpectedEOF |
| 1032 | } |
| 1033 | b := dAtA[iNdEx] |
| 1034 | iNdEx++ |
| 1035 | stringLenmapkey |= uint64(b&0x7F) << shift |
| 1036 | if b < 0x80 { |
| 1037 | break |
| 1038 | } |
| 1039 | } |
| 1040 | intStringLenmapkey := int(stringLenmapkey) |
| 1041 | if intStringLenmapkey < 0 { |
| 1042 | return protohelpers.ErrInvalidLength |
| 1043 | } |
| 1044 | postStringIndexmapkey := iNdEx + intStringLenmapkey |
| 1045 | if postStringIndexmapkey < 0 { |
| 1046 | return protohelpers.ErrInvalidLength |
| 1047 | } |
| 1048 | if postStringIndexmapkey > l { |
| 1049 | return io.ErrUnexpectedEOF |
| 1050 | } |
| 1051 | if intStringLenmapkey == 0 { |
| 1052 | mapkey = "" |
| 1053 | } else { |
| 1054 | mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) |
| 1055 | } |
| 1056 | iNdEx = postStringIndexmapkey |
| 1057 | } else if fieldNum == 2 { |
| 1058 | var mapbyteLen uint64 |
| 1059 | for shift := uint(0); ; shift += 7 { |
| 1060 | if shift >= 64 { |
| 1061 | return protohelpers.ErrIntOverflow |
| 1062 | } |
| 1063 | if iNdEx >= l { |
| 1064 | return io.ErrUnexpectedEOF |
| 1065 | } |
| 1066 | b := dAtA[iNdEx] |
| 1067 | iNdEx++ |
| 1068 | mapbyteLen |= uint64(b&0x7F) << shift |
| 1069 | if b < 0x80 { |
| 1070 | break |
| 1071 | } |
| 1072 | } |
| 1073 | intMapbyteLen := int(mapbyteLen) |
| 1074 | if intMapbyteLen < 0 { |
| 1075 | return protohelpers.ErrInvalidLength |
| 1076 | } |
| 1077 | postbytesIndex := iNdEx + intMapbyteLen |
| 1078 | if postbytesIndex < 0 { |
| 1079 | return protohelpers.ErrInvalidLength |
| 1080 | } |
| 1081 | if postbytesIndex > l { |
| 1082 | return io.ErrUnexpectedEOF |
| 1083 | } |
| 1084 | mapvalue = dAtA[iNdEx:postbytesIndex] |
| 1085 | iNdEx = postbytesIndex |
| 1086 | } else { |
| 1087 | iNdEx = entryPreIndex |
| 1088 | skippy, err := protohelpers.Skip(dAtA[iNdEx:]) |
| 1089 | if err != nil { |
| 1090 | return err |
| 1091 | } |
| 1092 | if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 1093 | return protohelpers.ErrInvalidLength |
| 1094 | } |
| 1095 | if (iNdEx + skippy) > postIndex { |
| 1096 | return io.ErrUnexpectedEOF |
| 1097 | } |
| 1098 | iNdEx += skippy |
| 1099 | } |
| 1100 | } |
| 1101 | m.Xattrs[mapkey] = mapvalue |
| 1102 | iNdEx = postIndex |
| 1103 | default: |
| 1104 | iNdEx = preIndex |
| 1105 | skippy, err := protohelpers.Skip(dAtA[iNdEx:]) |
| 1106 | if err != nil { |
| 1107 | return err |
| 1108 | } |
| 1109 | if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 1110 | return protohelpers.ErrInvalidLength |
| 1111 | } |
| 1112 | if (iNdEx + skippy) > l { |
| 1113 | return io.ErrUnexpectedEOF |
| 1114 | } |
| 1115 | m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) |
| 1116 | iNdEx += skippy |
| 1117 | } |
| 1118 | } |
| 1119 | |
| 1120 | if iNdEx > l { |
| 1121 | return io.ErrUnexpectedEOF |
| 1122 | } |
| 1123 | return nil |
| 1124 | } |