github.com/lalkh/containerd@v1.4.3/api/events/image.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/containerd/containerd/api/events/image.proto 3 4 package events 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 reflect "reflect" 14 strings "strings" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 27 28 type ImageCreate struct { 29 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 30 Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 31 XXX_NoUnkeyedLiteral struct{} `json:"-"` 32 XXX_unrecognized []byte `json:"-"` 33 XXX_sizecache int32 `json:"-"` 34 } 35 36 func (m *ImageCreate) Reset() { *m = ImageCreate{} } 37 func (*ImageCreate) ProtoMessage() {} 38 func (*ImageCreate) Descriptor() ([]byte, []int) { 39 return fileDescriptor_7085610f7b33e042, []int{0} 40 } 41 func (m *ImageCreate) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *ImageCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 if deterministic { 46 return xxx_messageInfo_ImageCreate.Marshal(b, m, deterministic) 47 } else { 48 b = b[:cap(b)] 49 n, err := m.MarshalToSizedBuffer(b) 50 if err != nil { 51 return nil, err 52 } 53 return b[:n], nil 54 } 55 } 56 func (m *ImageCreate) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_ImageCreate.Merge(m, src) 58 } 59 func (m *ImageCreate) XXX_Size() int { 60 return m.Size() 61 } 62 func (m *ImageCreate) XXX_DiscardUnknown() { 63 xxx_messageInfo_ImageCreate.DiscardUnknown(m) 64 } 65 66 var xxx_messageInfo_ImageCreate proto.InternalMessageInfo 67 68 type ImageUpdate struct { 69 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 70 Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 71 XXX_NoUnkeyedLiteral struct{} `json:"-"` 72 XXX_unrecognized []byte `json:"-"` 73 XXX_sizecache int32 `json:"-"` 74 } 75 76 func (m *ImageUpdate) Reset() { *m = ImageUpdate{} } 77 func (*ImageUpdate) ProtoMessage() {} 78 func (*ImageUpdate) Descriptor() ([]byte, []int) { 79 return fileDescriptor_7085610f7b33e042, []int{1} 80 } 81 func (m *ImageUpdate) XXX_Unmarshal(b []byte) error { 82 return m.Unmarshal(b) 83 } 84 func (m *ImageUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 85 if deterministic { 86 return xxx_messageInfo_ImageUpdate.Marshal(b, m, deterministic) 87 } else { 88 b = b[:cap(b)] 89 n, err := m.MarshalToSizedBuffer(b) 90 if err != nil { 91 return nil, err 92 } 93 return b[:n], nil 94 } 95 } 96 func (m *ImageUpdate) XXX_Merge(src proto.Message) { 97 xxx_messageInfo_ImageUpdate.Merge(m, src) 98 } 99 func (m *ImageUpdate) XXX_Size() int { 100 return m.Size() 101 } 102 func (m *ImageUpdate) XXX_DiscardUnknown() { 103 xxx_messageInfo_ImageUpdate.DiscardUnknown(m) 104 } 105 106 var xxx_messageInfo_ImageUpdate proto.InternalMessageInfo 107 108 type ImageDelete struct { 109 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 110 XXX_NoUnkeyedLiteral struct{} `json:"-"` 111 XXX_unrecognized []byte `json:"-"` 112 XXX_sizecache int32 `json:"-"` 113 } 114 115 func (m *ImageDelete) Reset() { *m = ImageDelete{} } 116 func (*ImageDelete) ProtoMessage() {} 117 func (*ImageDelete) Descriptor() ([]byte, []int) { 118 return fileDescriptor_7085610f7b33e042, []int{2} 119 } 120 func (m *ImageDelete) XXX_Unmarshal(b []byte) error { 121 return m.Unmarshal(b) 122 } 123 func (m *ImageDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 124 if deterministic { 125 return xxx_messageInfo_ImageDelete.Marshal(b, m, deterministic) 126 } else { 127 b = b[:cap(b)] 128 n, err := m.MarshalToSizedBuffer(b) 129 if err != nil { 130 return nil, err 131 } 132 return b[:n], nil 133 } 134 } 135 func (m *ImageDelete) XXX_Merge(src proto.Message) { 136 xxx_messageInfo_ImageDelete.Merge(m, src) 137 } 138 func (m *ImageDelete) XXX_Size() int { 139 return m.Size() 140 } 141 func (m *ImageDelete) XXX_DiscardUnknown() { 142 xxx_messageInfo_ImageDelete.DiscardUnknown(m) 143 } 144 145 var xxx_messageInfo_ImageDelete proto.InternalMessageInfo 146 147 func init() { 148 proto.RegisterType((*ImageCreate)(nil), "containerd.services.images.v1.ImageCreate") 149 proto.RegisterMapType((map[string]string)(nil), "containerd.services.images.v1.ImageCreate.LabelsEntry") 150 proto.RegisterType((*ImageUpdate)(nil), "containerd.services.images.v1.ImageUpdate") 151 proto.RegisterMapType((map[string]string)(nil), "containerd.services.images.v1.ImageUpdate.LabelsEntry") 152 proto.RegisterType((*ImageDelete)(nil), "containerd.services.images.v1.ImageDelete") 153 } 154 155 func init() { 156 proto.RegisterFile("github.com/containerd/containerd/api/events/image.proto", fileDescriptor_7085610f7b33e042) 157 } 158 159 var fileDescriptor_7085610f7b33e042 = []byte{ 160 // 292 bytes of a gzipped FileDescriptorProto 161 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4f, 0xcf, 0x2c, 0xc9, 162 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 163 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0x67, 0xe6, 164 0x26, 0xa6, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xc9, 0x22, 0x94, 0xe8, 0x15, 0xa7, 165 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb, 0x81, 0x15, 0x14, 0xeb, 0x95, 0x19, 0x4a, 0x39, 0x10, 166 0x34, 0x17, 0x6c, 0x4c, 0x52, 0x69, 0x9a, 0x7e, 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x9e, 0x7e, 0x5a, 167 0x66, 0x6a, 0x4e, 0x4a, 0x41, 0x62, 0x49, 0x06, 0xc4, 0x02, 0xa5, 0x35, 0x8c, 0x5c, 0xdc, 0x9e, 168 0x20, 0xf3, 0x9c, 0x8b, 0x52, 0x13, 0x4b, 0x52, 0x85, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53, 169 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x21, 0x3f, 0x2e, 0xb6, 0x9c, 0xc4, 0xa4, 170 0xd4, 0x9c, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x33, 0x3d, 0xbc, 0xae, 0xd2, 0x43, 171 0x32, 0x4f, 0xcf, 0x07, 0xac, 0xd1, 0x35, 0xaf, 0xa4, 0xa8, 0x32, 0x08, 0x6a, 0x8a, 0x94, 0x25, 172 0x17, 0x37, 0x92, 0xb0, 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0x25, 0xd4, 0x46, 0x10, 0x53, 0x48, 173 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x09, 0x2c, 0x06, 0xe1, 0x58, 0x31, 0x59, 174 0x30, 0x22, 0x9c, 0x1b, 0x5a, 0x90, 0x42, 0x55, 0xe7, 0x42, 0xcc, 0xa3, 0xb6, 0x73, 0x15, 0xa1, 175 0xae, 0x75, 0x49, 0xcd, 0x49, 0xc5, 0xee, 0x5a, 0xa7, 0x80, 0x13, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 176 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 177 0x1e, 0xc9, 0x31, 0x2e, 0xf8, 0x22, 0xc7, 0x18, 0x65, 0x44, 0x42, 0xc2, 0xb1, 0x86, 0x50, 0x11, 178 0x0c, 0x49, 0x6c, 0xe0, 0xb8, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x41, 0x80, 0x92, 0x17, 179 0x77, 0x02, 0x00, 0x00, 180 } 181 182 // Field returns the value for the given fieldpath as a string, if defined. 183 // If the value is not defined, the second value will be false. 184 func (m *ImageCreate) Field(fieldpath []string) (string, bool) { 185 if len(fieldpath) == 0 { 186 return "", false 187 } 188 189 switch fieldpath[0] { 190 case "name": 191 return string(m.Name), len(m.Name) > 0 192 case "labels": 193 // Labels fields have been special-cased by name. If this breaks, 194 // add better special casing to fieldpath plugin. 195 if len(m.Labels) == 0 { 196 return "", false 197 } 198 value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] 199 return value, ok 200 } 201 return "", false 202 } 203 204 // Field returns the value for the given fieldpath as a string, if defined. 205 // If the value is not defined, the second value will be false. 206 func (m *ImageUpdate) Field(fieldpath []string) (string, bool) { 207 if len(fieldpath) == 0 { 208 return "", false 209 } 210 211 switch fieldpath[0] { 212 case "name": 213 return string(m.Name), len(m.Name) > 0 214 case "labels": 215 // Labels fields have been special-cased by name. If this breaks, 216 // add better special casing to fieldpath plugin. 217 if len(m.Labels) == 0 { 218 return "", false 219 } 220 value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] 221 return value, ok 222 } 223 return "", false 224 } 225 226 // Field returns the value for the given fieldpath as a string, if defined. 227 // If the value is not defined, the second value will be false. 228 func (m *ImageDelete) Field(fieldpath []string) (string, bool) { 229 if len(fieldpath) == 0 { 230 return "", false 231 } 232 233 switch fieldpath[0] { 234 case "name": 235 return string(m.Name), len(m.Name) > 0 236 } 237 return "", false 238 } 239 func (m *ImageCreate) Marshal() (dAtA []byte, err error) { 240 size := m.Size() 241 dAtA = make([]byte, size) 242 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 243 if err != nil { 244 return nil, err 245 } 246 return dAtA[:n], nil 247 } 248 249 func (m *ImageCreate) MarshalTo(dAtA []byte) (int, error) { 250 size := m.Size() 251 return m.MarshalToSizedBuffer(dAtA[:size]) 252 } 253 254 func (m *ImageCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { 255 i := len(dAtA) 256 _ = i 257 var l int 258 _ = l 259 if m.XXX_unrecognized != nil { 260 i -= len(m.XXX_unrecognized) 261 copy(dAtA[i:], m.XXX_unrecognized) 262 } 263 if len(m.Labels) > 0 { 264 for k := range m.Labels { 265 v := m.Labels[k] 266 baseI := i 267 i -= len(v) 268 copy(dAtA[i:], v) 269 i = encodeVarintImage(dAtA, i, uint64(len(v))) 270 i-- 271 dAtA[i] = 0x12 272 i -= len(k) 273 copy(dAtA[i:], k) 274 i = encodeVarintImage(dAtA, i, uint64(len(k))) 275 i-- 276 dAtA[i] = 0xa 277 i = encodeVarintImage(dAtA, i, uint64(baseI-i)) 278 i-- 279 dAtA[i] = 0x12 280 } 281 } 282 if len(m.Name) > 0 { 283 i -= len(m.Name) 284 copy(dAtA[i:], m.Name) 285 i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) 286 i-- 287 dAtA[i] = 0xa 288 } 289 return len(dAtA) - i, nil 290 } 291 292 func (m *ImageUpdate) Marshal() (dAtA []byte, err error) { 293 size := m.Size() 294 dAtA = make([]byte, size) 295 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 296 if err != nil { 297 return nil, err 298 } 299 return dAtA[:n], nil 300 } 301 302 func (m *ImageUpdate) MarshalTo(dAtA []byte) (int, error) { 303 size := m.Size() 304 return m.MarshalToSizedBuffer(dAtA[:size]) 305 } 306 307 func (m *ImageUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { 308 i := len(dAtA) 309 _ = i 310 var l int 311 _ = l 312 if m.XXX_unrecognized != nil { 313 i -= len(m.XXX_unrecognized) 314 copy(dAtA[i:], m.XXX_unrecognized) 315 } 316 if len(m.Labels) > 0 { 317 for k := range m.Labels { 318 v := m.Labels[k] 319 baseI := i 320 i -= len(v) 321 copy(dAtA[i:], v) 322 i = encodeVarintImage(dAtA, i, uint64(len(v))) 323 i-- 324 dAtA[i] = 0x12 325 i -= len(k) 326 copy(dAtA[i:], k) 327 i = encodeVarintImage(dAtA, i, uint64(len(k))) 328 i-- 329 dAtA[i] = 0xa 330 i = encodeVarintImage(dAtA, i, uint64(baseI-i)) 331 i-- 332 dAtA[i] = 0x12 333 } 334 } 335 if len(m.Name) > 0 { 336 i -= len(m.Name) 337 copy(dAtA[i:], m.Name) 338 i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) 339 i-- 340 dAtA[i] = 0xa 341 } 342 return len(dAtA) - i, nil 343 } 344 345 func (m *ImageDelete) Marshal() (dAtA []byte, err error) { 346 size := m.Size() 347 dAtA = make([]byte, size) 348 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 349 if err != nil { 350 return nil, err 351 } 352 return dAtA[:n], nil 353 } 354 355 func (m *ImageDelete) MarshalTo(dAtA []byte) (int, error) { 356 size := m.Size() 357 return m.MarshalToSizedBuffer(dAtA[:size]) 358 } 359 360 func (m *ImageDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { 361 i := len(dAtA) 362 _ = i 363 var l int 364 _ = l 365 if m.XXX_unrecognized != nil { 366 i -= len(m.XXX_unrecognized) 367 copy(dAtA[i:], m.XXX_unrecognized) 368 } 369 if len(m.Name) > 0 { 370 i -= len(m.Name) 371 copy(dAtA[i:], m.Name) 372 i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) 373 i-- 374 dAtA[i] = 0xa 375 } 376 return len(dAtA) - i, nil 377 } 378 379 func encodeVarintImage(dAtA []byte, offset int, v uint64) int { 380 offset -= sovImage(v) 381 base := offset 382 for v >= 1<<7 { 383 dAtA[offset] = uint8(v&0x7f | 0x80) 384 v >>= 7 385 offset++ 386 } 387 dAtA[offset] = uint8(v) 388 return base 389 } 390 func (m *ImageCreate) Size() (n int) { 391 if m == nil { 392 return 0 393 } 394 var l int 395 _ = l 396 l = len(m.Name) 397 if l > 0 { 398 n += 1 + l + sovImage(uint64(l)) 399 } 400 if len(m.Labels) > 0 { 401 for k, v := range m.Labels { 402 _ = k 403 _ = v 404 mapEntrySize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) 405 n += mapEntrySize + 1 + sovImage(uint64(mapEntrySize)) 406 } 407 } 408 if m.XXX_unrecognized != nil { 409 n += len(m.XXX_unrecognized) 410 } 411 return n 412 } 413 414 func (m *ImageUpdate) Size() (n int) { 415 if m == nil { 416 return 0 417 } 418 var l int 419 _ = l 420 l = len(m.Name) 421 if l > 0 { 422 n += 1 + l + sovImage(uint64(l)) 423 } 424 if len(m.Labels) > 0 { 425 for k, v := range m.Labels { 426 _ = k 427 _ = v 428 mapEntrySize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) 429 n += mapEntrySize + 1 + sovImage(uint64(mapEntrySize)) 430 } 431 } 432 if m.XXX_unrecognized != nil { 433 n += len(m.XXX_unrecognized) 434 } 435 return n 436 } 437 438 func (m *ImageDelete) Size() (n int) { 439 if m == nil { 440 return 0 441 } 442 var l int 443 _ = l 444 l = len(m.Name) 445 if l > 0 { 446 n += 1 + l + sovImage(uint64(l)) 447 } 448 if m.XXX_unrecognized != nil { 449 n += len(m.XXX_unrecognized) 450 } 451 return n 452 } 453 454 func sovImage(x uint64) (n int) { 455 return (math_bits.Len64(x|1) + 6) / 7 456 } 457 func sozImage(x uint64) (n int) { 458 return sovImage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 459 } 460 func (this *ImageCreate) String() string { 461 if this == nil { 462 return "nil" 463 } 464 keysForLabels := make([]string, 0, len(this.Labels)) 465 for k, _ := range this.Labels { 466 keysForLabels = append(keysForLabels, k) 467 } 468 github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) 469 mapStringForLabels := "map[string]string{" 470 for _, k := range keysForLabels { 471 mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) 472 } 473 mapStringForLabels += "}" 474 s := strings.Join([]string{`&ImageCreate{`, 475 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 476 `Labels:` + mapStringForLabels + `,`, 477 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 478 `}`, 479 }, "") 480 return s 481 } 482 func (this *ImageUpdate) String() string { 483 if this == nil { 484 return "nil" 485 } 486 keysForLabels := make([]string, 0, len(this.Labels)) 487 for k, _ := range this.Labels { 488 keysForLabels = append(keysForLabels, k) 489 } 490 github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) 491 mapStringForLabels := "map[string]string{" 492 for _, k := range keysForLabels { 493 mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) 494 } 495 mapStringForLabels += "}" 496 s := strings.Join([]string{`&ImageUpdate{`, 497 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 498 `Labels:` + mapStringForLabels + `,`, 499 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 500 `}`, 501 }, "") 502 return s 503 } 504 func (this *ImageDelete) String() string { 505 if this == nil { 506 return "nil" 507 } 508 s := strings.Join([]string{`&ImageDelete{`, 509 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 510 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 511 `}`, 512 }, "") 513 return s 514 } 515 func valueToStringImage(v interface{}) string { 516 rv := reflect.ValueOf(v) 517 if rv.IsNil() { 518 return "nil" 519 } 520 pv := reflect.Indirect(rv).Interface() 521 return fmt.Sprintf("*%v", pv) 522 } 523 func (m *ImageCreate) Unmarshal(dAtA []byte) error { 524 l := len(dAtA) 525 iNdEx := 0 526 for iNdEx < l { 527 preIndex := iNdEx 528 var wire uint64 529 for shift := uint(0); ; shift += 7 { 530 if shift >= 64 { 531 return ErrIntOverflowImage 532 } 533 if iNdEx >= l { 534 return io.ErrUnexpectedEOF 535 } 536 b := dAtA[iNdEx] 537 iNdEx++ 538 wire |= uint64(b&0x7F) << shift 539 if b < 0x80 { 540 break 541 } 542 } 543 fieldNum := int32(wire >> 3) 544 wireType := int(wire & 0x7) 545 if wireType == 4 { 546 return fmt.Errorf("proto: ImageCreate: wiretype end group for non-group") 547 } 548 if fieldNum <= 0 { 549 return fmt.Errorf("proto: ImageCreate: illegal tag %d (wire type %d)", fieldNum, wire) 550 } 551 switch fieldNum { 552 case 1: 553 if wireType != 2 { 554 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 555 } 556 var stringLen uint64 557 for shift := uint(0); ; shift += 7 { 558 if shift >= 64 { 559 return ErrIntOverflowImage 560 } 561 if iNdEx >= l { 562 return io.ErrUnexpectedEOF 563 } 564 b := dAtA[iNdEx] 565 iNdEx++ 566 stringLen |= uint64(b&0x7F) << shift 567 if b < 0x80 { 568 break 569 } 570 } 571 intStringLen := int(stringLen) 572 if intStringLen < 0 { 573 return ErrInvalidLengthImage 574 } 575 postIndex := iNdEx + intStringLen 576 if postIndex < 0 { 577 return ErrInvalidLengthImage 578 } 579 if postIndex > l { 580 return io.ErrUnexpectedEOF 581 } 582 m.Name = string(dAtA[iNdEx:postIndex]) 583 iNdEx = postIndex 584 case 2: 585 if wireType != 2 { 586 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 587 } 588 var msglen int 589 for shift := uint(0); ; shift += 7 { 590 if shift >= 64 { 591 return ErrIntOverflowImage 592 } 593 if iNdEx >= l { 594 return io.ErrUnexpectedEOF 595 } 596 b := dAtA[iNdEx] 597 iNdEx++ 598 msglen |= int(b&0x7F) << shift 599 if b < 0x80 { 600 break 601 } 602 } 603 if msglen < 0 { 604 return ErrInvalidLengthImage 605 } 606 postIndex := iNdEx + msglen 607 if postIndex < 0 { 608 return ErrInvalidLengthImage 609 } 610 if postIndex > l { 611 return io.ErrUnexpectedEOF 612 } 613 if m.Labels == nil { 614 m.Labels = make(map[string]string) 615 } 616 var mapkey string 617 var mapvalue string 618 for iNdEx < postIndex { 619 entryPreIndex := iNdEx 620 var wire uint64 621 for shift := uint(0); ; shift += 7 { 622 if shift >= 64 { 623 return ErrIntOverflowImage 624 } 625 if iNdEx >= l { 626 return io.ErrUnexpectedEOF 627 } 628 b := dAtA[iNdEx] 629 iNdEx++ 630 wire |= uint64(b&0x7F) << shift 631 if b < 0x80 { 632 break 633 } 634 } 635 fieldNum := int32(wire >> 3) 636 if fieldNum == 1 { 637 var stringLenmapkey uint64 638 for shift := uint(0); ; shift += 7 { 639 if shift >= 64 { 640 return ErrIntOverflowImage 641 } 642 if iNdEx >= l { 643 return io.ErrUnexpectedEOF 644 } 645 b := dAtA[iNdEx] 646 iNdEx++ 647 stringLenmapkey |= uint64(b&0x7F) << shift 648 if b < 0x80 { 649 break 650 } 651 } 652 intStringLenmapkey := int(stringLenmapkey) 653 if intStringLenmapkey < 0 { 654 return ErrInvalidLengthImage 655 } 656 postStringIndexmapkey := iNdEx + intStringLenmapkey 657 if postStringIndexmapkey < 0 { 658 return ErrInvalidLengthImage 659 } 660 if postStringIndexmapkey > l { 661 return io.ErrUnexpectedEOF 662 } 663 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 664 iNdEx = postStringIndexmapkey 665 } else if fieldNum == 2 { 666 var stringLenmapvalue uint64 667 for shift := uint(0); ; shift += 7 { 668 if shift >= 64 { 669 return ErrIntOverflowImage 670 } 671 if iNdEx >= l { 672 return io.ErrUnexpectedEOF 673 } 674 b := dAtA[iNdEx] 675 iNdEx++ 676 stringLenmapvalue |= uint64(b&0x7F) << shift 677 if b < 0x80 { 678 break 679 } 680 } 681 intStringLenmapvalue := int(stringLenmapvalue) 682 if intStringLenmapvalue < 0 { 683 return ErrInvalidLengthImage 684 } 685 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 686 if postStringIndexmapvalue < 0 { 687 return ErrInvalidLengthImage 688 } 689 if postStringIndexmapvalue > l { 690 return io.ErrUnexpectedEOF 691 } 692 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 693 iNdEx = postStringIndexmapvalue 694 } else { 695 iNdEx = entryPreIndex 696 skippy, err := skipImage(dAtA[iNdEx:]) 697 if err != nil { 698 return err 699 } 700 if skippy < 0 { 701 return ErrInvalidLengthImage 702 } 703 if (iNdEx + skippy) > postIndex { 704 return io.ErrUnexpectedEOF 705 } 706 iNdEx += skippy 707 } 708 } 709 m.Labels[mapkey] = mapvalue 710 iNdEx = postIndex 711 default: 712 iNdEx = preIndex 713 skippy, err := skipImage(dAtA[iNdEx:]) 714 if err != nil { 715 return err 716 } 717 if skippy < 0 { 718 return ErrInvalidLengthImage 719 } 720 if (iNdEx + skippy) < 0 { 721 return ErrInvalidLengthImage 722 } 723 if (iNdEx + skippy) > l { 724 return io.ErrUnexpectedEOF 725 } 726 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 727 iNdEx += skippy 728 } 729 } 730 731 if iNdEx > l { 732 return io.ErrUnexpectedEOF 733 } 734 return nil 735 } 736 func (m *ImageUpdate) Unmarshal(dAtA []byte) error { 737 l := len(dAtA) 738 iNdEx := 0 739 for iNdEx < l { 740 preIndex := iNdEx 741 var wire uint64 742 for shift := uint(0); ; shift += 7 { 743 if shift >= 64 { 744 return ErrIntOverflowImage 745 } 746 if iNdEx >= l { 747 return io.ErrUnexpectedEOF 748 } 749 b := dAtA[iNdEx] 750 iNdEx++ 751 wire |= uint64(b&0x7F) << shift 752 if b < 0x80 { 753 break 754 } 755 } 756 fieldNum := int32(wire >> 3) 757 wireType := int(wire & 0x7) 758 if wireType == 4 { 759 return fmt.Errorf("proto: ImageUpdate: wiretype end group for non-group") 760 } 761 if fieldNum <= 0 { 762 return fmt.Errorf("proto: ImageUpdate: illegal tag %d (wire type %d)", fieldNum, wire) 763 } 764 switch fieldNum { 765 case 1: 766 if wireType != 2 { 767 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 768 } 769 var stringLen uint64 770 for shift := uint(0); ; shift += 7 { 771 if shift >= 64 { 772 return ErrIntOverflowImage 773 } 774 if iNdEx >= l { 775 return io.ErrUnexpectedEOF 776 } 777 b := dAtA[iNdEx] 778 iNdEx++ 779 stringLen |= uint64(b&0x7F) << shift 780 if b < 0x80 { 781 break 782 } 783 } 784 intStringLen := int(stringLen) 785 if intStringLen < 0 { 786 return ErrInvalidLengthImage 787 } 788 postIndex := iNdEx + intStringLen 789 if postIndex < 0 { 790 return ErrInvalidLengthImage 791 } 792 if postIndex > l { 793 return io.ErrUnexpectedEOF 794 } 795 m.Name = string(dAtA[iNdEx:postIndex]) 796 iNdEx = postIndex 797 case 2: 798 if wireType != 2 { 799 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 800 } 801 var msglen int 802 for shift := uint(0); ; shift += 7 { 803 if shift >= 64 { 804 return ErrIntOverflowImage 805 } 806 if iNdEx >= l { 807 return io.ErrUnexpectedEOF 808 } 809 b := dAtA[iNdEx] 810 iNdEx++ 811 msglen |= int(b&0x7F) << shift 812 if b < 0x80 { 813 break 814 } 815 } 816 if msglen < 0 { 817 return ErrInvalidLengthImage 818 } 819 postIndex := iNdEx + msglen 820 if postIndex < 0 { 821 return ErrInvalidLengthImage 822 } 823 if postIndex > l { 824 return io.ErrUnexpectedEOF 825 } 826 if m.Labels == nil { 827 m.Labels = make(map[string]string) 828 } 829 var mapkey string 830 var mapvalue string 831 for iNdEx < postIndex { 832 entryPreIndex := iNdEx 833 var wire uint64 834 for shift := uint(0); ; shift += 7 { 835 if shift >= 64 { 836 return ErrIntOverflowImage 837 } 838 if iNdEx >= l { 839 return io.ErrUnexpectedEOF 840 } 841 b := dAtA[iNdEx] 842 iNdEx++ 843 wire |= uint64(b&0x7F) << shift 844 if b < 0x80 { 845 break 846 } 847 } 848 fieldNum := int32(wire >> 3) 849 if fieldNum == 1 { 850 var stringLenmapkey uint64 851 for shift := uint(0); ; shift += 7 { 852 if shift >= 64 { 853 return ErrIntOverflowImage 854 } 855 if iNdEx >= l { 856 return io.ErrUnexpectedEOF 857 } 858 b := dAtA[iNdEx] 859 iNdEx++ 860 stringLenmapkey |= uint64(b&0x7F) << shift 861 if b < 0x80 { 862 break 863 } 864 } 865 intStringLenmapkey := int(stringLenmapkey) 866 if intStringLenmapkey < 0 { 867 return ErrInvalidLengthImage 868 } 869 postStringIndexmapkey := iNdEx + intStringLenmapkey 870 if postStringIndexmapkey < 0 { 871 return ErrInvalidLengthImage 872 } 873 if postStringIndexmapkey > l { 874 return io.ErrUnexpectedEOF 875 } 876 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 877 iNdEx = postStringIndexmapkey 878 } else if fieldNum == 2 { 879 var stringLenmapvalue uint64 880 for shift := uint(0); ; shift += 7 { 881 if shift >= 64 { 882 return ErrIntOverflowImage 883 } 884 if iNdEx >= l { 885 return io.ErrUnexpectedEOF 886 } 887 b := dAtA[iNdEx] 888 iNdEx++ 889 stringLenmapvalue |= uint64(b&0x7F) << shift 890 if b < 0x80 { 891 break 892 } 893 } 894 intStringLenmapvalue := int(stringLenmapvalue) 895 if intStringLenmapvalue < 0 { 896 return ErrInvalidLengthImage 897 } 898 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 899 if postStringIndexmapvalue < 0 { 900 return ErrInvalidLengthImage 901 } 902 if postStringIndexmapvalue > l { 903 return io.ErrUnexpectedEOF 904 } 905 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 906 iNdEx = postStringIndexmapvalue 907 } else { 908 iNdEx = entryPreIndex 909 skippy, err := skipImage(dAtA[iNdEx:]) 910 if err != nil { 911 return err 912 } 913 if skippy < 0 { 914 return ErrInvalidLengthImage 915 } 916 if (iNdEx + skippy) > postIndex { 917 return io.ErrUnexpectedEOF 918 } 919 iNdEx += skippy 920 } 921 } 922 m.Labels[mapkey] = mapvalue 923 iNdEx = postIndex 924 default: 925 iNdEx = preIndex 926 skippy, err := skipImage(dAtA[iNdEx:]) 927 if err != nil { 928 return err 929 } 930 if skippy < 0 { 931 return ErrInvalidLengthImage 932 } 933 if (iNdEx + skippy) < 0 { 934 return ErrInvalidLengthImage 935 } 936 if (iNdEx + skippy) > l { 937 return io.ErrUnexpectedEOF 938 } 939 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 940 iNdEx += skippy 941 } 942 } 943 944 if iNdEx > l { 945 return io.ErrUnexpectedEOF 946 } 947 return nil 948 } 949 func (m *ImageDelete) Unmarshal(dAtA []byte) error { 950 l := len(dAtA) 951 iNdEx := 0 952 for iNdEx < l { 953 preIndex := iNdEx 954 var wire uint64 955 for shift := uint(0); ; shift += 7 { 956 if shift >= 64 { 957 return ErrIntOverflowImage 958 } 959 if iNdEx >= l { 960 return io.ErrUnexpectedEOF 961 } 962 b := dAtA[iNdEx] 963 iNdEx++ 964 wire |= uint64(b&0x7F) << shift 965 if b < 0x80 { 966 break 967 } 968 } 969 fieldNum := int32(wire >> 3) 970 wireType := int(wire & 0x7) 971 if wireType == 4 { 972 return fmt.Errorf("proto: ImageDelete: wiretype end group for non-group") 973 } 974 if fieldNum <= 0 { 975 return fmt.Errorf("proto: ImageDelete: illegal tag %d (wire type %d)", fieldNum, wire) 976 } 977 switch fieldNum { 978 case 1: 979 if wireType != 2 { 980 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 981 } 982 var stringLen uint64 983 for shift := uint(0); ; shift += 7 { 984 if shift >= 64 { 985 return ErrIntOverflowImage 986 } 987 if iNdEx >= l { 988 return io.ErrUnexpectedEOF 989 } 990 b := dAtA[iNdEx] 991 iNdEx++ 992 stringLen |= uint64(b&0x7F) << shift 993 if b < 0x80 { 994 break 995 } 996 } 997 intStringLen := int(stringLen) 998 if intStringLen < 0 { 999 return ErrInvalidLengthImage 1000 } 1001 postIndex := iNdEx + intStringLen 1002 if postIndex < 0 { 1003 return ErrInvalidLengthImage 1004 } 1005 if postIndex > l { 1006 return io.ErrUnexpectedEOF 1007 } 1008 m.Name = string(dAtA[iNdEx:postIndex]) 1009 iNdEx = postIndex 1010 default: 1011 iNdEx = preIndex 1012 skippy, err := skipImage(dAtA[iNdEx:]) 1013 if err != nil { 1014 return err 1015 } 1016 if skippy < 0 { 1017 return ErrInvalidLengthImage 1018 } 1019 if (iNdEx + skippy) < 0 { 1020 return ErrInvalidLengthImage 1021 } 1022 if (iNdEx + skippy) > l { 1023 return io.ErrUnexpectedEOF 1024 } 1025 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1026 iNdEx += skippy 1027 } 1028 } 1029 1030 if iNdEx > l { 1031 return io.ErrUnexpectedEOF 1032 } 1033 return nil 1034 } 1035 func skipImage(dAtA []byte) (n int, err error) { 1036 l := len(dAtA) 1037 iNdEx := 0 1038 depth := 0 1039 for iNdEx < l { 1040 var wire uint64 1041 for shift := uint(0); ; shift += 7 { 1042 if shift >= 64 { 1043 return 0, ErrIntOverflowImage 1044 } 1045 if iNdEx >= l { 1046 return 0, io.ErrUnexpectedEOF 1047 } 1048 b := dAtA[iNdEx] 1049 iNdEx++ 1050 wire |= (uint64(b) & 0x7F) << shift 1051 if b < 0x80 { 1052 break 1053 } 1054 } 1055 wireType := int(wire & 0x7) 1056 switch wireType { 1057 case 0: 1058 for shift := uint(0); ; shift += 7 { 1059 if shift >= 64 { 1060 return 0, ErrIntOverflowImage 1061 } 1062 if iNdEx >= l { 1063 return 0, io.ErrUnexpectedEOF 1064 } 1065 iNdEx++ 1066 if dAtA[iNdEx-1] < 0x80 { 1067 break 1068 } 1069 } 1070 case 1: 1071 iNdEx += 8 1072 case 2: 1073 var length int 1074 for shift := uint(0); ; shift += 7 { 1075 if shift >= 64 { 1076 return 0, ErrIntOverflowImage 1077 } 1078 if iNdEx >= l { 1079 return 0, io.ErrUnexpectedEOF 1080 } 1081 b := dAtA[iNdEx] 1082 iNdEx++ 1083 length |= (int(b) & 0x7F) << shift 1084 if b < 0x80 { 1085 break 1086 } 1087 } 1088 if length < 0 { 1089 return 0, ErrInvalidLengthImage 1090 } 1091 iNdEx += length 1092 case 3: 1093 depth++ 1094 case 4: 1095 if depth == 0 { 1096 return 0, ErrUnexpectedEndOfGroupImage 1097 } 1098 depth-- 1099 case 5: 1100 iNdEx += 4 1101 default: 1102 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1103 } 1104 if iNdEx < 0 { 1105 return 0, ErrInvalidLengthImage 1106 } 1107 if depth == 0 { 1108 return iNdEx, nil 1109 } 1110 } 1111 return 0, io.ErrUnexpectedEOF 1112 } 1113 1114 var ( 1115 ErrInvalidLengthImage = fmt.Errorf("proto: negative length found during unmarshaling") 1116 ErrIntOverflowImage = fmt.Errorf("proto: integer overflow") 1117 ErrUnexpectedEndOfGroupImage = fmt.Errorf("proto: unexpected end of group") 1118 )