github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/builder/remotecontext/tarsum.pb.go (about) 1 // Code generated by protoc-gen-gogo. 2 // source: tarsum.proto 3 // DO NOT EDIT! 4 5 /* 6 Package remotecontext is a generated protocol buffer package. 7 8 It is generated from these files: 9 tarsum.proto 10 11 It has these top-level messages: 12 TarsumBackup 13 */ 14 package remotecontext 15 16 import proto "github.com/gogo/protobuf/proto" 17 import fmt "fmt" 18 import math "math" 19 20 import strings "strings" 21 import reflect "reflect" 22 import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 23 24 import io "io" 25 26 // Reference imports to suppress errors if they are not otherwise used. 27 var _ = proto.Marshal 28 var _ = fmt.Errorf 29 var _ = math.Inf 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 36 37 type TarsumBackup struct { 38 Hashes map[string]string `protobuf:"bytes,1,rep,name=Hashes" json:"Hashes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 39 } 40 41 func (m *TarsumBackup) Reset() { *m = TarsumBackup{} } 42 func (*TarsumBackup) ProtoMessage() {} 43 func (*TarsumBackup) Descriptor() ([]byte, []int) { return fileDescriptorTarsum, []int{0} } 44 45 func (m *TarsumBackup) GetHashes() map[string]string { 46 if m != nil { 47 return m.Hashes 48 } 49 return nil 50 } 51 52 func init() { 53 proto.RegisterType((*TarsumBackup)(nil), "remotecontext.TarsumBackup") 54 } 55 func (this *TarsumBackup) Equal(that interface{}) bool { 56 if that == nil { 57 if this == nil { 58 return true 59 } 60 return false 61 } 62 63 that1, ok := that.(*TarsumBackup) 64 if !ok { 65 that2, ok := that.(TarsumBackup) 66 if ok { 67 that1 = &that2 68 } else { 69 return false 70 } 71 } 72 if that1 == nil { 73 if this == nil { 74 return true 75 } 76 return false 77 } else if this == nil { 78 return false 79 } 80 if len(this.Hashes) != len(that1.Hashes) { 81 return false 82 } 83 for i := range this.Hashes { 84 if this.Hashes[i] != that1.Hashes[i] { 85 return false 86 } 87 } 88 return true 89 } 90 func (this *TarsumBackup) GoString() string { 91 if this == nil { 92 return "nil" 93 } 94 s := make([]string, 0, 5) 95 s = append(s, "&remotecontext.TarsumBackup{") 96 keysForHashes := make([]string, 0, len(this.Hashes)) 97 for k := range this.Hashes { 98 keysForHashes = append(keysForHashes, k) 99 } 100 github_com_gogo_protobuf_sortkeys.Strings(keysForHashes) 101 mapStringForHashes := "map[string]string{" 102 for _, k := range keysForHashes { 103 mapStringForHashes += fmt.Sprintf("%#v: %#v,", k, this.Hashes[k]) 104 } 105 mapStringForHashes += "}" 106 if this.Hashes != nil { 107 s = append(s, "Hashes: "+mapStringForHashes+",\n") 108 } 109 s = append(s, "}") 110 return strings.Join(s, "") 111 } 112 func valueToGoStringTarsum(v interface{}, typ string) string { 113 rv := reflect.ValueOf(v) 114 if rv.IsNil() { 115 return "nil" 116 } 117 pv := reflect.Indirect(rv).Interface() 118 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 119 } 120 func (m *TarsumBackup) Marshal() (dAtA []byte, err error) { 121 size := m.Size() 122 dAtA = make([]byte, size) 123 n, err := m.MarshalTo(dAtA) 124 if err != nil { 125 return nil, err 126 } 127 return dAtA[:n], nil 128 } 129 130 func (m *TarsumBackup) MarshalTo(dAtA []byte) (int, error) { 131 var i int 132 _ = i 133 var l int 134 _ = l 135 if len(m.Hashes) > 0 { 136 for k := range m.Hashes { 137 dAtA[i] = 0xa 138 i++ 139 v := m.Hashes[k] 140 mapSize := 1 + len(k) + sovTarsum(uint64(len(k))) + 1 + len(v) + sovTarsum(uint64(len(v))) 141 i = encodeVarintTarsum(dAtA, i, uint64(mapSize)) 142 dAtA[i] = 0xa 143 i++ 144 i = encodeVarintTarsum(dAtA, i, uint64(len(k))) 145 i += copy(dAtA[i:], k) 146 dAtA[i] = 0x12 147 i++ 148 i = encodeVarintTarsum(dAtA, i, uint64(len(v))) 149 i += copy(dAtA[i:], v) 150 } 151 } 152 return i, nil 153 } 154 155 func encodeFixed64Tarsum(dAtA []byte, offset int, v uint64) int { 156 dAtA[offset] = uint8(v) 157 dAtA[offset+1] = uint8(v >> 8) 158 dAtA[offset+2] = uint8(v >> 16) 159 dAtA[offset+3] = uint8(v >> 24) 160 dAtA[offset+4] = uint8(v >> 32) 161 dAtA[offset+5] = uint8(v >> 40) 162 dAtA[offset+6] = uint8(v >> 48) 163 dAtA[offset+7] = uint8(v >> 56) 164 return offset + 8 165 } 166 func encodeFixed32Tarsum(dAtA []byte, offset int, v uint32) int { 167 dAtA[offset] = uint8(v) 168 dAtA[offset+1] = uint8(v >> 8) 169 dAtA[offset+2] = uint8(v >> 16) 170 dAtA[offset+3] = uint8(v >> 24) 171 return offset + 4 172 } 173 func encodeVarintTarsum(dAtA []byte, offset int, v uint64) int { 174 for v >= 1<<7 { 175 dAtA[offset] = uint8(v&0x7f | 0x80) 176 v >>= 7 177 offset++ 178 } 179 dAtA[offset] = uint8(v) 180 return offset + 1 181 } 182 func (m *TarsumBackup) Size() (n int) { 183 var l int 184 _ = l 185 if len(m.Hashes) > 0 { 186 for k, v := range m.Hashes { 187 _ = k 188 _ = v 189 mapEntrySize := 1 + len(k) + sovTarsum(uint64(len(k))) + 1 + len(v) + sovTarsum(uint64(len(v))) 190 n += mapEntrySize + 1 + sovTarsum(uint64(mapEntrySize)) 191 } 192 } 193 return n 194 } 195 196 func sovTarsum(x uint64) (n int) { 197 for { 198 n++ 199 x >>= 7 200 if x == 0 { 201 break 202 } 203 } 204 return n 205 } 206 func sozTarsum(x uint64) (n int) { 207 return sovTarsum(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 208 } 209 func (this *TarsumBackup) String() string { 210 if this == nil { 211 return "nil" 212 } 213 keysForHashes := make([]string, 0, len(this.Hashes)) 214 for k := range this.Hashes { 215 keysForHashes = append(keysForHashes, k) 216 } 217 github_com_gogo_protobuf_sortkeys.Strings(keysForHashes) 218 mapStringForHashes := "map[string]string{" 219 for _, k := range keysForHashes { 220 mapStringForHashes += fmt.Sprintf("%v: %v,", k, this.Hashes[k]) 221 } 222 mapStringForHashes += "}" 223 s := strings.Join([]string{`&TarsumBackup{`, 224 `Hashes:` + mapStringForHashes + `,`, 225 `}`, 226 }, "") 227 return s 228 } 229 func valueToStringTarsum(v interface{}) string { 230 rv := reflect.ValueOf(v) 231 if rv.IsNil() { 232 return "nil" 233 } 234 pv := reflect.Indirect(rv).Interface() 235 return fmt.Sprintf("*%v", pv) 236 } 237 func (m *TarsumBackup) Unmarshal(dAtA []byte) error { 238 l := len(dAtA) 239 iNdEx := 0 240 for iNdEx < l { 241 preIndex := iNdEx 242 var wire uint64 243 for shift := uint(0); ; shift += 7 { 244 if shift >= 64 { 245 return ErrIntOverflowTarsum 246 } 247 if iNdEx >= l { 248 return io.ErrUnexpectedEOF 249 } 250 b := dAtA[iNdEx] 251 iNdEx++ 252 wire |= (uint64(b) & 0x7F) << shift 253 if b < 0x80 { 254 break 255 } 256 } 257 fieldNum := int32(wire >> 3) 258 wireType := int(wire & 0x7) 259 if wireType == 4 { 260 return fmt.Errorf("proto: TarsumBackup: wiretype end group for non-group") 261 } 262 if fieldNum <= 0 { 263 return fmt.Errorf("proto: TarsumBackup: illegal tag %d (wire type %d)", fieldNum, wire) 264 } 265 switch fieldNum { 266 case 1: 267 if wireType != 2 { 268 return fmt.Errorf("proto: wrong wireType = %d for field Hashes", wireType) 269 } 270 var msglen int 271 for shift := uint(0); ; shift += 7 { 272 if shift >= 64 { 273 return ErrIntOverflowTarsum 274 } 275 if iNdEx >= l { 276 return io.ErrUnexpectedEOF 277 } 278 b := dAtA[iNdEx] 279 iNdEx++ 280 msglen |= (int(b) & 0x7F) << shift 281 if b < 0x80 { 282 break 283 } 284 } 285 if msglen < 0 { 286 return ErrInvalidLengthTarsum 287 } 288 postIndex := iNdEx + msglen 289 if postIndex > l { 290 return io.ErrUnexpectedEOF 291 } 292 var keykey uint64 293 for shift := uint(0); ; shift += 7 { 294 if shift >= 64 { 295 return ErrIntOverflowTarsum 296 } 297 if iNdEx >= l { 298 return io.ErrUnexpectedEOF 299 } 300 b := dAtA[iNdEx] 301 iNdEx++ 302 keykey |= (uint64(b) & 0x7F) << shift 303 if b < 0x80 { 304 break 305 } 306 } 307 var stringLenmapkey uint64 308 for shift := uint(0); ; shift += 7 { 309 if shift >= 64 { 310 return ErrIntOverflowTarsum 311 } 312 if iNdEx >= l { 313 return io.ErrUnexpectedEOF 314 } 315 b := dAtA[iNdEx] 316 iNdEx++ 317 stringLenmapkey |= (uint64(b) & 0x7F) << shift 318 if b < 0x80 { 319 break 320 } 321 } 322 intStringLenmapkey := int(stringLenmapkey) 323 if intStringLenmapkey < 0 { 324 return ErrInvalidLengthTarsum 325 } 326 postStringIndexmapkey := iNdEx + intStringLenmapkey 327 if postStringIndexmapkey > l { 328 return io.ErrUnexpectedEOF 329 } 330 mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) 331 iNdEx = postStringIndexmapkey 332 if m.Hashes == nil { 333 m.Hashes = make(map[string]string) 334 } 335 if iNdEx < postIndex { 336 var valuekey uint64 337 for shift := uint(0); ; shift += 7 { 338 if shift >= 64 { 339 return ErrIntOverflowTarsum 340 } 341 if iNdEx >= l { 342 return io.ErrUnexpectedEOF 343 } 344 b := dAtA[iNdEx] 345 iNdEx++ 346 valuekey |= (uint64(b) & 0x7F) << shift 347 if b < 0x80 { 348 break 349 } 350 } 351 var stringLenmapvalue uint64 352 for shift := uint(0); ; shift += 7 { 353 if shift >= 64 { 354 return ErrIntOverflowTarsum 355 } 356 if iNdEx >= l { 357 return io.ErrUnexpectedEOF 358 } 359 b := dAtA[iNdEx] 360 iNdEx++ 361 stringLenmapvalue |= (uint64(b) & 0x7F) << shift 362 if b < 0x80 { 363 break 364 } 365 } 366 intStringLenmapvalue := int(stringLenmapvalue) 367 if intStringLenmapvalue < 0 { 368 return ErrInvalidLengthTarsum 369 } 370 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 371 if postStringIndexmapvalue > l { 372 return io.ErrUnexpectedEOF 373 } 374 mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) 375 iNdEx = postStringIndexmapvalue 376 m.Hashes[mapkey] = mapvalue 377 } else { 378 var mapvalue string 379 m.Hashes[mapkey] = mapvalue 380 } 381 iNdEx = postIndex 382 default: 383 iNdEx = preIndex 384 skippy, err := skipTarsum(dAtA[iNdEx:]) 385 if err != nil { 386 return err 387 } 388 if skippy < 0 { 389 return ErrInvalidLengthTarsum 390 } 391 if (iNdEx + skippy) > l { 392 return io.ErrUnexpectedEOF 393 } 394 iNdEx += skippy 395 } 396 } 397 398 if iNdEx > l { 399 return io.ErrUnexpectedEOF 400 } 401 return nil 402 } 403 func skipTarsum(dAtA []byte) (n int, err error) { 404 l := len(dAtA) 405 iNdEx := 0 406 for iNdEx < l { 407 var wire uint64 408 for shift := uint(0); ; shift += 7 { 409 if shift >= 64 { 410 return 0, ErrIntOverflowTarsum 411 } 412 if iNdEx >= l { 413 return 0, io.ErrUnexpectedEOF 414 } 415 b := dAtA[iNdEx] 416 iNdEx++ 417 wire |= (uint64(b) & 0x7F) << shift 418 if b < 0x80 { 419 break 420 } 421 } 422 wireType := int(wire & 0x7) 423 switch wireType { 424 case 0: 425 for shift := uint(0); ; shift += 7 { 426 if shift >= 64 { 427 return 0, ErrIntOverflowTarsum 428 } 429 if iNdEx >= l { 430 return 0, io.ErrUnexpectedEOF 431 } 432 iNdEx++ 433 if dAtA[iNdEx-1] < 0x80 { 434 break 435 } 436 } 437 return iNdEx, nil 438 case 1: 439 iNdEx += 8 440 return iNdEx, nil 441 case 2: 442 var length int 443 for shift := uint(0); ; shift += 7 { 444 if shift >= 64 { 445 return 0, ErrIntOverflowTarsum 446 } 447 if iNdEx >= l { 448 return 0, io.ErrUnexpectedEOF 449 } 450 b := dAtA[iNdEx] 451 iNdEx++ 452 length |= (int(b) & 0x7F) << shift 453 if b < 0x80 { 454 break 455 } 456 } 457 iNdEx += length 458 if length < 0 { 459 return 0, ErrInvalidLengthTarsum 460 } 461 return iNdEx, nil 462 case 3: 463 for { 464 var innerWire uint64 465 var start int = iNdEx 466 for shift := uint(0); ; shift += 7 { 467 if shift >= 64 { 468 return 0, ErrIntOverflowTarsum 469 } 470 if iNdEx >= l { 471 return 0, io.ErrUnexpectedEOF 472 } 473 b := dAtA[iNdEx] 474 iNdEx++ 475 innerWire |= (uint64(b) & 0x7F) << shift 476 if b < 0x80 { 477 break 478 } 479 } 480 innerWireType := int(innerWire & 0x7) 481 if innerWireType == 4 { 482 break 483 } 484 next, err := skipTarsum(dAtA[start:]) 485 if err != nil { 486 return 0, err 487 } 488 iNdEx = start + next 489 } 490 return iNdEx, nil 491 case 4: 492 return iNdEx, nil 493 case 5: 494 iNdEx += 4 495 return iNdEx, nil 496 default: 497 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 498 } 499 } 500 panic("unreachable") 501 } 502 503 var ( 504 ErrInvalidLengthTarsum = fmt.Errorf("proto: negative length found during unmarshaling") 505 ErrIntOverflowTarsum = fmt.Errorf("proto: integer overflow") 506 ) 507 508 func init() { proto.RegisterFile("tarsum.proto", fileDescriptorTarsum) } 509 510 var fileDescriptorTarsum = []byte{ 511 // 196 bytes of a gzipped FileDescriptorProto 512 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x49, 0x2c, 0x2a, 513 0x2e, 0xcd, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2d, 0x4a, 0xcd, 0xcd, 0x2f, 0x49, 514 0x4d, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0x51, 0xea, 0x62, 0xe4, 0xe2, 0x09, 0x01, 0xcb, 0x3b, 515 0x25, 0x26, 0x67, 0x97, 0x16, 0x08, 0xd9, 0x73, 0xb1, 0x79, 0x24, 0x16, 0x67, 0xa4, 0x16, 0x4b, 516 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x1b, 0xa9, 0xeb, 0xa1, 0x68, 0xd0, 0x43, 0x56, 0xac, 0x07, 0x51, 517 0xe9, 0x9a, 0x57, 0x52, 0x54, 0x19, 0x04, 0xd5, 0x26, 0x65, 0xc9, 0xc5, 0x8d, 0x24, 0x2c, 0x24, 518 0xc0, 0xc5, 0x9c, 0x9d, 0x5a, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x62, 0x0a, 0x89, 519 0x70, 0xb1, 0x96, 0x25, 0xe6, 0x94, 0xa6, 0x4a, 0x30, 0x81, 0xc5, 0x20, 0x1c, 0x2b, 0x26, 0x0b, 520 0x46, 0x27, 0x9d, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, 0x8e, 0xb1, 521 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 522 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 523 0xc7, 0x90, 0xc4, 0x06, 0xf6, 0x90, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x89, 0x57, 0x7d, 0x3f, 524 0xe0, 0x00, 0x00, 0x00, 525 }