github.com/google/cadvisor@v0.49.1/third_party/containerd/api/events/container.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/containerd/containerd/api/events/container.proto 3 4 package events 5 6 import ( 7 fmt "fmt" 8 github_com_containerd_typeurl "github.com/containerd/typeurl" 9 proto "github.com/gogo/protobuf/proto" 10 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 11 types "github.com/gogo/protobuf/types" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 reflect "reflect" 16 strings "strings" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = fmt.Errorf 22 var _ = math.Inf 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 type ContainerCreate struct { 31 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 32 Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` 33 Runtime *ContainerCreate_Runtime `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"` 34 XXX_NoUnkeyedLiteral struct{} `json:"-"` 35 XXX_unrecognized []byte `json:"-"` 36 XXX_sizecache int32 `json:"-"` 37 } 38 39 func (m *ContainerCreate) Reset() { *m = ContainerCreate{} } 40 func (*ContainerCreate) ProtoMessage() {} 41 func (*ContainerCreate) Descriptor() ([]byte, []int) { 42 return fileDescriptor_0d1f05b8626f83ea, []int{0} 43 } 44 func (m *ContainerCreate) XXX_Unmarshal(b []byte) error { 45 return m.Unmarshal(b) 46 } 47 func (m *ContainerCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 if deterministic { 49 return xxx_messageInfo_ContainerCreate.Marshal(b, m, deterministic) 50 } else { 51 b = b[:cap(b)] 52 n, err := m.MarshalToSizedBuffer(b) 53 if err != nil { 54 return nil, err 55 } 56 return b[:n], nil 57 } 58 } 59 func (m *ContainerCreate) XXX_Merge(src proto.Message) { 60 xxx_messageInfo_ContainerCreate.Merge(m, src) 61 } 62 func (m *ContainerCreate) XXX_Size() int { 63 return m.Size() 64 } 65 func (m *ContainerCreate) XXX_DiscardUnknown() { 66 xxx_messageInfo_ContainerCreate.DiscardUnknown(m) 67 } 68 69 var xxx_messageInfo_ContainerCreate proto.InternalMessageInfo 70 71 type ContainerCreate_Runtime struct { 72 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 73 Options *types.Any `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` 74 XXX_NoUnkeyedLiteral struct{} `json:"-"` 75 XXX_unrecognized []byte `json:"-"` 76 XXX_sizecache int32 `json:"-"` 77 } 78 79 func (m *ContainerCreate_Runtime) Reset() { *m = ContainerCreate_Runtime{} } 80 func (*ContainerCreate_Runtime) ProtoMessage() {} 81 func (*ContainerCreate_Runtime) Descriptor() ([]byte, []int) { 82 return fileDescriptor_0d1f05b8626f83ea, []int{0, 0} 83 } 84 func (m *ContainerCreate_Runtime) XXX_Unmarshal(b []byte) error { 85 return m.Unmarshal(b) 86 } 87 func (m *ContainerCreate_Runtime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 88 if deterministic { 89 return xxx_messageInfo_ContainerCreate_Runtime.Marshal(b, m, deterministic) 90 } else { 91 b = b[:cap(b)] 92 n, err := m.MarshalToSizedBuffer(b) 93 if err != nil { 94 return nil, err 95 } 96 return b[:n], nil 97 } 98 } 99 func (m *ContainerCreate_Runtime) XXX_Merge(src proto.Message) { 100 xxx_messageInfo_ContainerCreate_Runtime.Merge(m, src) 101 } 102 func (m *ContainerCreate_Runtime) XXX_Size() int { 103 return m.Size() 104 } 105 func (m *ContainerCreate_Runtime) XXX_DiscardUnknown() { 106 xxx_messageInfo_ContainerCreate_Runtime.DiscardUnknown(m) 107 } 108 109 var xxx_messageInfo_ContainerCreate_Runtime proto.InternalMessageInfo 110 111 type ContainerUpdate struct { 112 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 113 Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` 114 Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 115 SnapshotKey string `protobuf:"bytes,4,opt,name=snapshot_key,json=snapshotKey,proto3" json:"snapshot_key,omitempty"` 116 XXX_NoUnkeyedLiteral struct{} `json:"-"` 117 XXX_unrecognized []byte `json:"-"` 118 XXX_sizecache int32 `json:"-"` 119 } 120 121 func (m *ContainerUpdate) Reset() { *m = ContainerUpdate{} } 122 func (*ContainerUpdate) ProtoMessage() {} 123 func (*ContainerUpdate) Descriptor() ([]byte, []int) { 124 return fileDescriptor_0d1f05b8626f83ea, []int{1} 125 } 126 func (m *ContainerUpdate) XXX_Unmarshal(b []byte) error { 127 return m.Unmarshal(b) 128 } 129 func (m *ContainerUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 130 if deterministic { 131 return xxx_messageInfo_ContainerUpdate.Marshal(b, m, deterministic) 132 } else { 133 b = b[:cap(b)] 134 n, err := m.MarshalToSizedBuffer(b) 135 if err != nil { 136 return nil, err 137 } 138 return b[:n], nil 139 } 140 } 141 func (m *ContainerUpdate) XXX_Merge(src proto.Message) { 142 xxx_messageInfo_ContainerUpdate.Merge(m, src) 143 } 144 func (m *ContainerUpdate) XXX_Size() int { 145 return m.Size() 146 } 147 func (m *ContainerUpdate) XXX_DiscardUnknown() { 148 xxx_messageInfo_ContainerUpdate.DiscardUnknown(m) 149 } 150 151 var xxx_messageInfo_ContainerUpdate proto.InternalMessageInfo 152 153 type ContainerDelete struct { 154 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 155 XXX_NoUnkeyedLiteral struct{} `json:"-"` 156 XXX_unrecognized []byte `json:"-"` 157 XXX_sizecache int32 `json:"-"` 158 } 159 160 func (m *ContainerDelete) Reset() { *m = ContainerDelete{} } 161 func (*ContainerDelete) ProtoMessage() {} 162 func (*ContainerDelete) Descriptor() ([]byte, []int) { 163 return fileDescriptor_0d1f05b8626f83ea, []int{2} 164 } 165 func (m *ContainerDelete) XXX_Unmarshal(b []byte) error { 166 return m.Unmarshal(b) 167 } 168 func (m *ContainerDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 169 if deterministic { 170 return xxx_messageInfo_ContainerDelete.Marshal(b, m, deterministic) 171 } else { 172 b = b[:cap(b)] 173 n, err := m.MarshalToSizedBuffer(b) 174 if err != nil { 175 return nil, err 176 } 177 return b[:n], nil 178 } 179 } 180 func (m *ContainerDelete) XXX_Merge(src proto.Message) { 181 xxx_messageInfo_ContainerDelete.Merge(m, src) 182 } 183 func (m *ContainerDelete) XXX_Size() int { 184 return m.Size() 185 } 186 func (m *ContainerDelete) XXX_DiscardUnknown() { 187 xxx_messageInfo_ContainerDelete.DiscardUnknown(m) 188 } 189 190 var xxx_messageInfo_ContainerDelete proto.InternalMessageInfo 191 192 func init() { 193 proto.RegisterType((*ContainerCreate)(nil), "containerd.events.ContainerCreate") 194 proto.RegisterType((*ContainerCreate_Runtime)(nil), "containerd.events.ContainerCreate.Runtime") 195 proto.RegisterType((*ContainerUpdate)(nil), "containerd.events.ContainerUpdate") 196 proto.RegisterMapType((map[string]string)(nil), "containerd.events.ContainerUpdate.LabelsEntry") 197 proto.RegisterType((*ContainerDelete)(nil), "containerd.events.ContainerDelete") 198 } 199 200 func init() { 201 proto.RegisterFile("github.com/containerd/containerd/api/events/container.proto", fileDescriptor_0d1f05b8626f83ea) 202 } 203 204 var fileDescriptor_0d1f05b8626f83ea = []byte{ 205 // 413 bytes of a gzipped FileDescriptorProto 206 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x0a, 0xd3, 0x30, 207 0x18, 0xc7, 0x97, 0x76, 0x6e, 0x98, 0x0a, 0x6a, 0x18, 0x52, 0x7b, 0xa8, 0x73, 0xa7, 0xe9, 0x21, 208 0x85, 0x7a, 0x51, 0x77, 0xd1, 0x6d, 0x0a, 0xa2, 0x82, 0x14, 0x84, 0xe1, 0x45, 0xd2, 0x35, 0xeb, 209 0x82, 0x6d, 0x52, 0xda, 0x74, 0xd0, 0x9b, 0x8f, 0xe2, 0xe3, 0xec, 0xe8, 0xc1, 0x83, 0x27, 0x71, 210 0x05, 0xdf, 0xc0, 0x07, 0x90, 0x26, 0xeb, 0x56, 0x14, 0x95, 0x9d, 0xfa, 0xcf, 0xd7, 0xff, 0x3f, 211 0xdf, 0xf7, 0xfb, 0x08, 0x9c, 0xc5, 0x4c, 0x6e, 0xcb, 0x10, 0xaf, 0x45, 0xea, 0xad, 0x05, 0x97, 212 0x84, 0x71, 0x9a, 0x47, 0x5d, 0x49, 0x32, 0xe6, 0xd1, 0x1d, 0xe5, 0xb2, 0x38, 0x57, 0x71, 0x96, 213 0x0b, 0x29, 0xd0, 0xcd, 0xb3, 0x0d, 0x6b, 0x8b, 0x73, 0x3b, 0x16, 0x22, 0x4e, 0xa8, 0xa7, 0x0c, 214 0x61, 0xb9, 0xf1, 0x08, 0xaf, 0xb4, 0xdb, 0x19, 0xc5, 0x22, 0x16, 0x4a, 0x7a, 0x8d, 0x3a, 0x56, 215 0x9f, 0xfc, 0x77, 0x80, 0xd3, 0x55, 0x59, 0x52, 0xc6, 0x8c, 0x7b, 0x1b, 0x46, 0x93, 0x28, 0x23, 216 0x72, 0xab, 0x6f, 0x98, 0x7c, 0x01, 0xf0, 0xfa, 0xa2, 0xb5, 0x2f, 0x72, 0x4a, 0x24, 0x45, 0xb7, 217 0xa0, 0xc1, 0x22, 0x1b, 0x8c, 0xc1, 0xf4, 0xea, 0x7c, 0x50, 0x7f, 0xbb, 0x63, 0xbc, 0x58, 0x06, 218 0x06, 0x8b, 0xd0, 0x08, 0x5e, 0x61, 0x29, 0x89, 0xa9, 0x6d, 0x34, 0xbf, 0x02, 0x7d, 0x40, 0x4b, 219 0x38, 0xcc, 0x4b, 0x2e, 0x59, 0x4a, 0x6d, 0x73, 0x0c, 0xa6, 0x96, 0x7f, 0x1f, 0xff, 0x41, 0x86, 220 0x7f, 0x6b, 0x81, 0x03, 0x9d, 0x08, 0xda, 0xa8, 0xf3, 0x1a, 0x0e, 0x8f, 0x35, 0x84, 0x60, 0x9f, 221 0x93, 0x94, 0xea, 0x01, 0x02, 0xa5, 0x11, 0x86, 0x43, 0x91, 0x49, 0x26, 0x78, 0xa1, 0x9a, 0x5b, 222 0xfe, 0x08, 0xeb, 0x5d, 0xe1, 0x16, 0x10, 0x3f, 0xe5, 0x55, 0xd0, 0x9a, 0x26, 0x3f, 0xba, 0x58, 223 0x6f, 0xb3, 0xe8, 0x72, 0xac, 0xe7, 0x70, 0x90, 0x90, 0x90, 0x26, 0x85, 0x6d, 0x8e, 0xcd, 0xa9, 224 0xe5, 0xe3, 0x7f, 0x51, 0xe9, 0x0e, 0xf8, 0x95, 0x0a, 0x3c, 0xe3, 0x32, 0xaf, 0x82, 0x63, 0x1a, 225 0xdd, 0x85, 0xd7, 0x0a, 0x4e, 0xb2, 0x62, 0x2b, 0xe4, 0xfb, 0x0f, 0xb4, 0xb2, 0xfb, 0xaa, 0x89, 226 0xd5, 0xd6, 0x5e, 0xd2, 0xca, 0x79, 0x04, 0xad, 0x4e, 0x12, 0xdd, 0x80, 0x66, 0x63, 0xd4, 0xf8, 227 0x8d, 0x6c, 0x26, 0xdc, 0x91, 0xa4, 0x3c, 0x4d, 0xa8, 0x0e, 0x8f, 0x8d, 0x87, 0x60, 0x72, 0xaf, 228 0x83, 0xb9, 0xa4, 0x09, 0xfd, 0x3b, 0xe6, 0xfc, 0xcd, 0xfe, 0xe0, 0xf6, 0xbe, 0x1e, 0xdc, 0xde, 229 0xc7, 0xda, 0x05, 0xfb, 0xda, 0x05, 0x9f, 0x6b, 0x17, 0x7c, 0xaf, 0x5d, 0xf0, 0xe9, 0xa7, 0x0b, 230 0xde, 0xf9, 0x17, 0x3c, 0xe5, 0x99, 0xfe, 0xac, 0xc0, 0xca, 0x08, 0x07, 0x6a, 0xff, 0x0f, 0x7e, 231 0x05, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x09, 0xe0, 0xd6, 0x0b, 0x03, 0x00, 0x00, 232 } 233 234 // Field returns the value for the given fieldpath as a string, if defined. 235 // If the value is not defined, the second value will be false. 236 func (m *ContainerCreate) Field(fieldpath []string) (string, bool) { 237 if len(fieldpath) == 0 { 238 return "", false 239 } 240 241 switch fieldpath[0] { 242 case "id": 243 return string(m.ID), len(m.ID) > 0 244 case "image": 245 return string(m.Image), len(m.Image) > 0 246 case "runtime": 247 // NOTE(stevvooe): This is probably not correct in many cases. 248 // We assume that the target message also implements the Field 249 // method, which isn't likely true in a lot of cases. 250 // 251 // If you have a broken build and have found this comment, 252 // you may be closer to a solution. 253 if m.Runtime == nil { 254 return "", false 255 } 256 257 return m.Runtime.Field(fieldpath[1:]) 258 } 259 return "", false 260 } 261 262 // Field returns the value for the given fieldpath as a string, if defined. 263 // If the value is not defined, the second value will be false. 264 func (m *ContainerCreate_Runtime) Field(fieldpath []string) (string, bool) { 265 if len(fieldpath) == 0 { 266 return "", false 267 } 268 269 switch fieldpath[0] { 270 case "name": 271 return string(m.Name), len(m.Name) > 0 272 case "options": 273 decoded, err := github_com_containerd_typeurl.UnmarshalAny(m.Options) 274 if err != nil { 275 return "", false 276 } 277 278 adaptor, ok := decoded.(interface{ Field([]string) (string, bool) }) 279 if !ok { 280 return "", false 281 } 282 return adaptor.Field(fieldpath[1:]) 283 } 284 return "", false 285 } 286 287 // Field returns the value for the given fieldpath as a string, if defined. 288 // If the value is not defined, the second value will be false. 289 func (m *ContainerUpdate) Field(fieldpath []string) (string, bool) { 290 if len(fieldpath) == 0 { 291 return "", false 292 } 293 294 switch fieldpath[0] { 295 case "id": 296 return string(m.ID), len(m.ID) > 0 297 case "image": 298 return string(m.Image), len(m.Image) > 0 299 case "labels": 300 // Labels fields have been special-cased by name. If this breaks, 301 // add better special casing to fieldpath plugin. 302 if len(m.Labels) == 0 { 303 return "", false 304 } 305 value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] 306 return value, ok 307 case "snapshot_key": 308 return string(m.SnapshotKey), len(m.SnapshotKey) > 0 309 } 310 return "", false 311 } 312 313 // Field returns the value for the given fieldpath as a string, if defined. 314 // If the value is not defined, the second value will be false. 315 func (m *ContainerDelete) Field(fieldpath []string) (string, bool) { 316 if len(fieldpath) == 0 { 317 return "", false 318 } 319 320 switch fieldpath[0] { 321 case "id": 322 return string(m.ID), len(m.ID) > 0 323 } 324 return "", false 325 } 326 func (m *ContainerCreate) Marshal() (dAtA []byte, err error) { 327 size := m.Size() 328 dAtA = make([]byte, size) 329 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 330 if err != nil { 331 return nil, err 332 } 333 return dAtA[:n], nil 334 } 335 336 func (m *ContainerCreate) MarshalTo(dAtA []byte) (int, error) { 337 size := m.Size() 338 return m.MarshalToSizedBuffer(dAtA[:size]) 339 } 340 341 func (m *ContainerCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { 342 i := len(dAtA) 343 _ = i 344 var l int 345 _ = l 346 if m.XXX_unrecognized != nil { 347 i -= len(m.XXX_unrecognized) 348 copy(dAtA[i:], m.XXX_unrecognized) 349 } 350 if m.Runtime != nil { 351 { 352 size, err := m.Runtime.MarshalToSizedBuffer(dAtA[:i]) 353 if err != nil { 354 return 0, err 355 } 356 i -= size 357 i = encodeVarintContainer(dAtA, i, uint64(size)) 358 } 359 i-- 360 dAtA[i] = 0x1a 361 } 362 if len(m.Image) > 0 { 363 i -= len(m.Image) 364 copy(dAtA[i:], m.Image) 365 i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) 366 i-- 367 dAtA[i] = 0x12 368 } 369 if len(m.ID) > 0 { 370 i -= len(m.ID) 371 copy(dAtA[i:], m.ID) 372 i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) 373 i-- 374 dAtA[i] = 0xa 375 } 376 return len(dAtA) - i, nil 377 } 378 379 func (m *ContainerCreate_Runtime) Marshal() (dAtA []byte, err error) { 380 size := m.Size() 381 dAtA = make([]byte, size) 382 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 383 if err != nil { 384 return nil, err 385 } 386 return dAtA[:n], nil 387 } 388 389 func (m *ContainerCreate_Runtime) MarshalTo(dAtA []byte) (int, error) { 390 size := m.Size() 391 return m.MarshalToSizedBuffer(dAtA[:size]) 392 } 393 394 func (m *ContainerCreate_Runtime) MarshalToSizedBuffer(dAtA []byte) (int, error) { 395 i := len(dAtA) 396 _ = i 397 var l int 398 _ = l 399 if m.XXX_unrecognized != nil { 400 i -= len(m.XXX_unrecognized) 401 copy(dAtA[i:], m.XXX_unrecognized) 402 } 403 if m.Options != nil { 404 { 405 size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) 406 if err != nil { 407 return 0, err 408 } 409 i -= size 410 i = encodeVarintContainer(dAtA, i, uint64(size)) 411 } 412 i-- 413 dAtA[i] = 0x12 414 } 415 if len(m.Name) > 0 { 416 i -= len(m.Name) 417 copy(dAtA[i:], m.Name) 418 i = encodeVarintContainer(dAtA, i, uint64(len(m.Name))) 419 i-- 420 dAtA[i] = 0xa 421 } 422 return len(dAtA) - i, nil 423 } 424 425 func (m *ContainerUpdate) Marshal() (dAtA []byte, err error) { 426 size := m.Size() 427 dAtA = make([]byte, size) 428 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 429 if err != nil { 430 return nil, err 431 } 432 return dAtA[:n], nil 433 } 434 435 func (m *ContainerUpdate) MarshalTo(dAtA []byte) (int, error) { 436 size := m.Size() 437 return m.MarshalToSizedBuffer(dAtA[:size]) 438 } 439 440 func (m *ContainerUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { 441 i := len(dAtA) 442 _ = i 443 var l int 444 _ = l 445 if m.XXX_unrecognized != nil { 446 i -= len(m.XXX_unrecognized) 447 copy(dAtA[i:], m.XXX_unrecognized) 448 } 449 if len(m.SnapshotKey) > 0 { 450 i -= len(m.SnapshotKey) 451 copy(dAtA[i:], m.SnapshotKey) 452 i = encodeVarintContainer(dAtA, i, uint64(len(m.SnapshotKey))) 453 i-- 454 dAtA[i] = 0x22 455 } 456 if len(m.Labels) > 0 { 457 for k := range m.Labels { 458 v := m.Labels[k] 459 baseI := i 460 i -= len(v) 461 copy(dAtA[i:], v) 462 i = encodeVarintContainer(dAtA, i, uint64(len(v))) 463 i-- 464 dAtA[i] = 0x12 465 i -= len(k) 466 copy(dAtA[i:], k) 467 i = encodeVarintContainer(dAtA, i, uint64(len(k))) 468 i-- 469 dAtA[i] = 0xa 470 i = encodeVarintContainer(dAtA, i, uint64(baseI-i)) 471 i-- 472 dAtA[i] = 0x1a 473 } 474 } 475 if len(m.Image) > 0 { 476 i -= len(m.Image) 477 copy(dAtA[i:], m.Image) 478 i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) 479 i-- 480 dAtA[i] = 0x12 481 } 482 if len(m.ID) > 0 { 483 i -= len(m.ID) 484 copy(dAtA[i:], m.ID) 485 i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) 486 i-- 487 dAtA[i] = 0xa 488 } 489 return len(dAtA) - i, nil 490 } 491 492 func (m *ContainerDelete) Marshal() (dAtA []byte, err error) { 493 size := m.Size() 494 dAtA = make([]byte, size) 495 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 496 if err != nil { 497 return nil, err 498 } 499 return dAtA[:n], nil 500 } 501 502 func (m *ContainerDelete) MarshalTo(dAtA []byte) (int, error) { 503 size := m.Size() 504 return m.MarshalToSizedBuffer(dAtA[:size]) 505 } 506 507 func (m *ContainerDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { 508 i := len(dAtA) 509 _ = i 510 var l int 511 _ = l 512 if m.XXX_unrecognized != nil { 513 i -= len(m.XXX_unrecognized) 514 copy(dAtA[i:], m.XXX_unrecognized) 515 } 516 if len(m.ID) > 0 { 517 i -= len(m.ID) 518 copy(dAtA[i:], m.ID) 519 i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) 520 i-- 521 dAtA[i] = 0xa 522 } 523 return len(dAtA) - i, nil 524 } 525 526 func encodeVarintContainer(dAtA []byte, offset int, v uint64) int { 527 offset -= sovContainer(v) 528 base := offset 529 for v >= 1<<7 { 530 dAtA[offset] = uint8(v&0x7f | 0x80) 531 v >>= 7 532 offset++ 533 } 534 dAtA[offset] = uint8(v) 535 return base 536 } 537 func (m *ContainerCreate) Size() (n int) { 538 if m == nil { 539 return 0 540 } 541 var l int 542 _ = l 543 l = len(m.ID) 544 if l > 0 { 545 n += 1 + l + sovContainer(uint64(l)) 546 } 547 l = len(m.Image) 548 if l > 0 { 549 n += 1 + l + sovContainer(uint64(l)) 550 } 551 if m.Runtime != nil { 552 l = m.Runtime.Size() 553 n += 1 + l + sovContainer(uint64(l)) 554 } 555 if m.XXX_unrecognized != nil { 556 n += len(m.XXX_unrecognized) 557 } 558 return n 559 } 560 561 func (m *ContainerCreate_Runtime) Size() (n int) { 562 if m == nil { 563 return 0 564 } 565 var l int 566 _ = l 567 l = len(m.Name) 568 if l > 0 { 569 n += 1 + l + sovContainer(uint64(l)) 570 } 571 if m.Options != nil { 572 l = m.Options.Size() 573 n += 1 + l + sovContainer(uint64(l)) 574 } 575 if m.XXX_unrecognized != nil { 576 n += len(m.XXX_unrecognized) 577 } 578 return n 579 } 580 581 func (m *ContainerUpdate) Size() (n int) { 582 if m == nil { 583 return 0 584 } 585 var l int 586 _ = l 587 l = len(m.ID) 588 if l > 0 { 589 n += 1 + l + sovContainer(uint64(l)) 590 } 591 l = len(m.Image) 592 if l > 0 { 593 n += 1 + l + sovContainer(uint64(l)) 594 } 595 if len(m.Labels) > 0 { 596 for k, v := range m.Labels { 597 _ = k 598 _ = v 599 mapEntrySize := 1 + len(k) + sovContainer(uint64(len(k))) + 1 + len(v) + sovContainer(uint64(len(v))) 600 n += mapEntrySize + 1 + sovContainer(uint64(mapEntrySize)) 601 } 602 } 603 l = len(m.SnapshotKey) 604 if l > 0 { 605 n += 1 + l + sovContainer(uint64(l)) 606 } 607 if m.XXX_unrecognized != nil { 608 n += len(m.XXX_unrecognized) 609 } 610 return n 611 } 612 613 func (m *ContainerDelete) Size() (n int) { 614 if m == nil { 615 return 0 616 } 617 var l int 618 _ = l 619 l = len(m.ID) 620 if l > 0 { 621 n += 1 + l + sovContainer(uint64(l)) 622 } 623 if m.XXX_unrecognized != nil { 624 n += len(m.XXX_unrecognized) 625 } 626 return n 627 } 628 629 func sovContainer(x uint64) (n int) { 630 return (math_bits.Len64(x|1) + 6) / 7 631 } 632 func sozContainer(x uint64) (n int) { 633 return sovContainer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 634 } 635 func (this *ContainerCreate) String() string { 636 if this == nil { 637 return "nil" 638 } 639 s := strings.Join([]string{`&ContainerCreate{`, 640 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 641 `Image:` + fmt.Sprintf("%v", this.Image) + `,`, 642 `Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "ContainerCreate_Runtime", "ContainerCreate_Runtime", 1) + `,`, 643 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 644 `}`, 645 }, "") 646 return s 647 } 648 func (this *ContainerCreate_Runtime) String() string { 649 if this == nil { 650 return "nil" 651 } 652 s := strings.Join([]string{`&ContainerCreate_Runtime{`, 653 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 654 `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types.Any", 1) + `,`, 655 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 656 `}`, 657 }, "") 658 return s 659 } 660 func (this *ContainerUpdate) String() string { 661 if this == nil { 662 return "nil" 663 } 664 keysForLabels := make([]string, 0, len(this.Labels)) 665 for k, _ := range this.Labels { 666 keysForLabels = append(keysForLabels, k) 667 } 668 github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) 669 mapStringForLabels := "map[string]string{" 670 for _, k := range keysForLabels { 671 mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) 672 } 673 mapStringForLabels += "}" 674 s := strings.Join([]string{`&ContainerUpdate{`, 675 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 676 `Image:` + fmt.Sprintf("%v", this.Image) + `,`, 677 `Labels:` + mapStringForLabels + `,`, 678 `SnapshotKey:` + fmt.Sprintf("%v", this.SnapshotKey) + `,`, 679 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 680 `}`, 681 }, "") 682 return s 683 } 684 func (this *ContainerDelete) String() string { 685 if this == nil { 686 return "nil" 687 } 688 s := strings.Join([]string{`&ContainerDelete{`, 689 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 690 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 691 `}`, 692 }, "") 693 return s 694 } 695 func valueToStringContainer(v interface{}) string { 696 rv := reflect.ValueOf(v) 697 if rv.IsNil() { 698 return "nil" 699 } 700 pv := reflect.Indirect(rv).Interface() 701 return fmt.Sprintf("*%v", pv) 702 } 703 func (m *ContainerCreate) Unmarshal(dAtA []byte) error { 704 l := len(dAtA) 705 iNdEx := 0 706 for iNdEx < l { 707 preIndex := iNdEx 708 var wire uint64 709 for shift := uint(0); ; shift += 7 { 710 if shift >= 64 { 711 return ErrIntOverflowContainer 712 } 713 if iNdEx >= l { 714 return io.ErrUnexpectedEOF 715 } 716 b := dAtA[iNdEx] 717 iNdEx++ 718 wire |= uint64(b&0x7F) << shift 719 if b < 0x80 { 720 break 721 } 722 } 723 fieldNum := int32(wire >> 3) 724 wireType := int(wire & 0x7) 725 if wireType == 4 { 726 return fmt.Errorf("proto: ContainerCreate: wiretype end group for non-group") 727 } 728 if fieldNum <= 0 { 729 return fmt.Errorf("proto: ContainerCreate: illegal tag %d (wire type %d)", fieldNum, wire) 730 } 731 switch fieldNum { 732 case 1: 733 if wireType != 2 { 734 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 735 } 736 var stringLen uint64 737 for shift := uint(0); ; shift += 7 { 738 if shift >= 64 { 739 return ErrIntOverflowContainer 740 } 741 if iNdEx >= l { 742 return io.ErrUnexpectedEOF 743 } 744 b := dAtA[iNdEx] 745 iNdEx++ 746 stringLen |= uint64(b&0x7F) << shift 747 if b < 0x80 { 748 break 749 } 750 } 751 intStringLen := int(stringLen) 752 if intStringLen < 0 { 753 return ErrInvalidLengthContainer 754 } 755 postIndex := iNdEx + intStringLen 756 if postIndex < 0 { 757 return ErrInvalidLengthContainer 758 } 759 if postIndex > l { 760 return io.ErrUnexpectedEOF 761 } 762 m.ID = string(dAtA[iNdEx:postIndex]) 763 iNdEx = postIndex 764 case 2: 765 if wireType != 2 { 766 return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) 767 } 768 var stringLen uint64 769 for shift := uint(0); ; shift += 7 { 770 if shift >= 64 { 771 return ErrIntOverflowContainer 772 } 773 if iNdEx >= l { 774 return io.ErrUnexpectedEOF 775 } 776 b := dAtA[iNdEx] 777 iNdEx++ 778 stringLen |= uint64(b&0x7F) << shift 779 if b < 0x80 { 780 break 781 } 782 } 783 intStringLen := int(stringLen) 784 if intStringLen < 0 { 785 return ErrInvalidLengthContainer 786 } 787 postIndex := iNdEx + intStringLen 788 if postIndex < 0 { 789 return ErrInvalidLengthContainer 790 } 791 if postIndex > l { 792 return io.ErrUnexpectedEOF 793 } 794 m.Image = string(dAtA[iNdEx:postIndex]) 795 iNdEx = postIndex 796 case 3: 797 if wireType != 2 { 798 return fmt.Errorf("proto: wrong wireType = %d for field Runtime", wireType) 799 } 800 var msglen int 801 for shift := uint(0); ; shift += 7 { 802 if shift >= 64 { 803 return ErrIntOverflowContainer 804 } 805 if iNdEx >= l { 806 return io.ErrUnexpectedEOF 807 } 808 b := dAtA[iNdEx] 809 iNdEx++ 810 msglen |= int(b&0x7F) << shift 811 if b < 0x80 { 812 break 813 } 814 } 815 if msglen < 0 { 816 return ErrInvalidLengthContainer 817 } 818 postIndex := iNdEx + msglen 819 if postIndex < 0 { 820 return ErrInvalidLengthContainer 821 } 822 if postIndex > l { 823 return io.ErrUnexpectedEOF 824 } 825 if m.Runtime == nil { 826 m.Runtime = &ContainerCreate_Runtime{} 827 } 828 if err := m.Runtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 829 return err 830 } 831 iNdEx = postIndex 832 default: 833 iNdEx = preIndex 834 skippy, err := skipContainer(dAtA[iNdEx:]) 835 if err != nil { 836 return err 837 } 838 if (skippy < 0) || (iNdEx+skippy) < 0 { 839 return ErrInvalidLengthContainer 840 } 841 if (iNdEx + skippy) > l { 842 return io.ErrUnexpectedEOF 843 } 844 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 845 iNdEx += skippy 846 } 847 } 848 849 if iNdEx > l { 850 return io.ErrUnexpectedEOF 851 } 852 return nil 853 } 854 func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error { 855 l := len(dAtA) 856 iNdEx := 0 857 for iNdEx < l { 858 preIndex := iNdEx 859 var wire uint64 860 for shift := uint(0); ; shift += 7 { 861 if shift >= 64 { 862 return ErrIntOverflowContainer 863 } 864 if iNdEx >= l { 865 return io.ErrUnexpectedEOF 866 } 867 b := dAtA[iNdEx] 868 iNdEx++ 869 wire |= uint64(b&0x7F) << shift 870 if b < 0x80 { 871 break 872 } 873 } 874 fieldNum := int32(wire >> 3) 875 wireType := int(wire & 0x7) 876 if wireType == 4 { 877 return fmt.Errorf("proto: Runtime: wiretype end group for non-group") 878 } 879 if fieldNum <= 0 { 880 return fmt.Errorf("proto: Runtime: illegal tag %d (wire type %d)", fieldNum, wire) 881 } 882 switch fieldNum { 883 case 1: 884 if wireType != 2 { 885 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 886 } 887 var stringLen uint64 888 for shift := uint(0); ; shift += 7 { 889 if shift >= 64 { 890 return ErrIntOverflowContainer 891 } 892 if iNdEx >= l { 893 return io.ErrUnexpectedEOF 894 } 895 b := dAtA[iNdEx] 896 iNdEx++ 897 stringLen |= uint64(b&0x7F) << shift 898 if b < 0x80 { 899 break 900 } 901 } 902 intStringLen := int(stringLen) 903 if intStringLen < 0 { 904 return ErrInvalidLengthContainer 905 } 906 postIndex := iNdEx + intStringLen 907 if postIndex < 0 { 908 return ErrInvalidLengthContainer 909 } 910 if postIndex > l { 911 return io.ErrUnexpectedEOF 912 } 913 m.Name = string(dAtA[iNdEx:postIndex]) 914 iNdEx = postIndex 915 case 2: 916 if wireType != 2 { 917 return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) 918 } 919 var msglen int 920 for shift := uint(0); ; shift += 7 { 921 if shift >= 64 { 922 return ErrIntOverflowContainer 923 } 924 if iNdEx >= l { 925 return io.ErrUnexpectedEOF 926 } 927 b := dAtA[iNdEx] 928 iNdEx++ 929 msglen |= int(b&0x7F) << shift 930 if b < 0x80 { 931 break 932 } 933 } 934 if msglen < 0 { 935 return ErrInvalidLengthContainer 936 } 937 postIndex := iNdEx + msglen 938 if postIndex < 0 { 939 return ErrInvalidLengthContainer 940 } 941 if postIndex > l { 942 return io.ErrUnexpectedEOF 943 } 944 if m.Options == nil { 945 m.Options = &types.Any{} 946 } 947 if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 948 return err 949 } 950 iNdEx = postIndex 951 default: 952 iNdEx = preIndex 953 skippy, err := skipContainer(dAtA[iNdEx:]) 954 if err != nil { 955 return err 956 } 957 if (skippy < 0) || (iNdEx+skippy) < 0 { 958 return ErrInvalidLengthContainer 959 } 960 if (iNdEx + skippy) > l { 961 return io.ErrUnexpectedEOF 962 } 963 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 964 iNdEx += skippy 965 } 966 } 967 968 if iNdEx > l { 969 return io.ErrUnexpectedEOF 970 } 971 return nil 972 } 973 func (m *ContainerUpdate) Unmarshal(dAtA []byte) error { 974 l := len(dAtA) 975 iNdEx := 0 976 for iNdEx < l { 977 preIndex := iNdEx 978 var wire uint64 979 for shift := uint(0); ; shift += 7 { 980 if shift >= 64 { 981 return ErrIntOverflowContainer 982 } 983 if iNdEx >= l { 984 return io.ErrUnexpectedEOF 985 } 986 b := dAtA[iNdEx] 987 iNdEx++ 988 wire |= uint64(b&0x7F) << shift 989 if b < 0x80 { 990 break 991 } 992 } 993 fieldNum := int32(wire >> 3) 994 wireType := int(wire & 0x7) 995 if wireType == 4 { 996 return fmt.Errorf("proto: ContainerUpdate: wiretype end group for non-group") 997 } 998 if fieldNum <= 0 { 999 return fmt.Errorf("proto: ContainerUpdate: illegal tag %d (wire type %d)", fieldNum, wire) 1000 } 1001 switch fieldNum { 1002 case 1: 1003 if wireType != 2 { 1004 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 1005 } 1006 var stringLen uint64 1007 for shift := uint(0); ; shift += 7 { 1008 if shift >= 64 { 1009 return ErrIntOverflowContainer 1010 } 1011 if iNdEx >= l { 1012 return io.ErrUnexpectedEOF 1013 } 1014 b := dAtA[iNdEx] 1015 iNdEx++ 1016 stringLen |= uint64(b&0x7F) << shift 1017 if b < 0x80 { 1018 break 1019 } 1020 } 1021 intStringLen := int(stringLen) 1022 if intStringLen < 0 { 1023 return ErrInvalidLengthContainer 1024 } 1025 postIndex := iNdEx + intStringLen 1026 if postIndex < 0 { 1027 return ErrInvalidLengthContainer 1028 } 1029 if postIndex > l { 1030 return io.ErrUnexpectedEOF 1031 } 1032 m.ID = string(dAtA[iNdEx:postIndex]) 1033 iNdEx = postIndex 1034 case 2: 1035 if wireType != 2 { 1036 return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) 1037 } 1038 var stringLen uint64 1039 for shift := uint(0); ; shift += 7 { 1040 if shift >= 64 { 1041 return ErrIntOverflowContainer 1042 } 1043 if iNdEx >= l { 1044 return io.ErrUnexpectedEOF 1045 } 1046 b := dAtA[iNdEx] 1047 iNdEx++ 1048 stringLen |= uint64(b&0x7F) << shift 1049 if b < 0x80 { 1050 break 1051 } 1052 } 1053 intStringLen := int(stringLen) 1054 if intStringLen < 0 { 1055 return ErrInvalidLengthContainer 1056 } 1057 postIndex := iNdEx + intStringLen 1058 if postIndex < 0 { 1059 return ErrInvalidLengthContainer 1060 } 1061 if postIndex > l { 1062 return io.ErrUnexpectedEOF 1063 } 1064 m.Image = string(dAtA[iNdEx:postIndex]) 1065 iNdEx = postIndex 1066 case 3: 1067 if wireType != 2 { 1068 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 1069 } 1070 var msglen int 1071 for shift := uint(0); ; shift += 7 { 1072 if shift >= 64 { 1073 return ErrIntOverflowContainer 1074 } 1075 if iNdEx >= l { 1076 return io.ErrUnexpectedEOF 1077 } 1078 b := dAtA[iNdEx] 1079 iNdEx++ 1080 msglen |= int(b&0x7F) << shift 1081 if b < 0x80 { 1082 break 1083 } 1084 } 1085 if msglen < 0 { 1086 return ErrInvalidLengthContainer 1087 } 1088 postIndex := iNdEx + msglen 1089 if postIndex < 0 { 1090 return ErrInvalidLengthContainer 1091 } 1092 if postIndex > l { 1093 return io.ErrUnexpectedEOF 1094 } 1095 if m.Labels == nil { 1096 m.Labels = make(map[string]string) 1097 } 1098 var mapkey string 1099 var mapvalue string 1100 for iNdEx < postIndex { 1101 entryPreIndex := iNdEx 1102 var wire uint64 1103 for shift := uint(0); ; shift += 7 { 1104 if shift >= 64 { 1105 return ErrIntOverflowContainer 1106 } 1107 if iNdEx >= l { 1108 return io.ErrUnexpectedEOF 1109 } 1110 b := dAtA[iNdEx] 1111 iNdEx++ 1112 wire |= uint64(b&0x7F) << shift 1113 if b < 0x80 { 1114 break 1115 } 1116 } 1117 fieldNum := int32(wire >> 3) 1118 if fieldNum == 1 { 1119 var stringLenmapkey uint64 1120 for shift := uint(0); ; shift += 7 { 1121 if shift >= 64 { 1122 return ErrIntOverflowContainer 1123 } 1124 if iNdEx >= l { 1125 return io.ErrUnexpectedEOF 1126 } 1127 b := dAtA[iNdEx] 1128 iNdEx++ 1129 stringLenmapkey |= uint64(b&0x7F) << shift 1130 if b < 0x80 { 1131 break 1132 } 1133 } 1134 intStringLenmapkey := int(stringLenmapkey) 1135 if intStringLenmapkey < 0 { 1136 return ErrInvalidLengthContainer 1137 } 1138 postStringIndexmapkey := iNdEx + intStringLenmapkey 1139 if postStringIndexmapkey < 0 { 1140 return ErrInvalidLengthContainer 1141 } 1142 if postStringIndexmapkey > l { 1143 return io.ErrUnexpectedEOF 1144 } 1145 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1146 iNdEx = postStringIndexmapkey 1147 } else if fieldNum == 2 { 1148 var stringLenmapvalue uint64 1149 for shift := uint(0); ; shift += 7 { 1150 if shift >= 64 { 1151 return ErrIntOverflowContainer 1152 } 1153 if iNdEx >= l { 1154 return io.ErrUnexpectedEOF 1155 } 1156 b := dAtA[iNdEx] 1157 iNdEx++ 1158 stringLenmapvalue |= uint64(b&0x7F) << shift 1159 if b < 0x80 { 1160 break 1161 } 1162 } 1163 intStringLenmapvalue := int(stringLenmapvalue) 1164 if intStringLenmapvalue < 0 { 1165 return ErrInvalidLengthContainer 1166 } 1167 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 1168 if postStringIndexmapvalue < 0 { 1169 return ErrInvalidLengthContainer 1170 } 1171 if postStringIndexmapvalue > l { 1172 return io.ErrUnexpectedEOF 1173 } 1174 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 1175 iNdEx = postStringIndexmapvalue 1176 } else { 1177 iNdEx = entryPreIndex 1178 skippy, err := skipContainer(dAtA[iNdEx:]) 1179 if err != nil { 1180 return err 1181 } 1182 if (skippy < 0) || (iNdEx+skippy) < 0 { 1183 return ErrInvalidLengthContainer 1184 } 1185 if (iNdEx + skippy) > postIndex { 1186 return io.ErrUnexpectedEOF 1187 } 1188 iNdEx += skippy 1189 } 1190 } 1191 m.Labels[mapkey] = mapvalue 1192 iNdEx = postIndex 1193 case 4: 1194 if wireType != 2 { 1195 return fmt.Errorf("proto: wrong wireType = %d for field SnapshotKey", wireType) 1196 } 1197 var stringLen uint64 1198 for shift := uint(0); ; shift += 7 { 1199 if shift >= 64 { 1200 return ErrIntOverflowContainer 1201 } 1202 if iNdEx >= l { 1203 return io.ErrUnexpectedEOF 1204 } 1205 b := dAtA[iNdEx] 1206 iNdEx++ 1207 stringLen |= uint64(b&0x7F) << shift 1208 if b < 0x80 { 1209 break 1210 } 1211 } 1212 intStringLen := int(stringLen) 1213 if intStringLen < 0 { 1214 return ErrInvalidLengthContainer 1215 } 1216 postIndex := iNdEx + intStringLen 1217 if postIndex < 0 { 1218 return ErrInvalidLengthContainer 1219 } 1220 if postIndex > l { 1221 return io.ErrUnexpectedEOF 1222 } 1223 m.SnapshotKey = string(dAtA[iNdEx:postIndex]) 1224 iNdEx = postIndex 1225 default: 1226 iNdEx = preIndex 1227 skippy, err := skipContainer(dAtA[iNdEx:]) 1228 if err != nil { 1229 return err 1230 } 1231 if (skippy < 0) || (iNdEx+skippy) < 0 { 1232 return ErrInvalidLengthContainer 1233 } 1234 if (iNdEx + skippy) > l { 1235 return io.ErrUnexpectedEOF 1236 } 1237 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1238 iNdEx += skippy 1239 } 1240 } 1241 1242 if iNdEx > l { 1243 return io.ErrUnexpectedEOF 1244 } 1245 return nil 1246 } 1247 func (m *ContainerDelete) Unmarshal(dAtA []byte) error { 1248 l := len(dAtA) 1249 iNdEx := 0 1250 for iNdEx < l { 1251 preIndex := iNdEx 1252 var wire uint64 1253 for shift := uint(0); ; shift += 7 { 1254 if shift >= 64 { 1255 return ErrIntOverflowContainer 1256 } 1257 if iNdEx >= l { 1258 return io.ErrUnexpectedEOF 1259 } 1260 b := dAtA[iNdEx] 1261 iNdEx++ 1262 wire |= uint64(b&0x7F) << shift 1263 if b < 0x80 { 1264 break 1265 } 1266 } 1267 fieldNum := int32(wire >> 3) 1268 wireType := int(wire & 0x7) 1269 if wireType == 4 { 1270 return fmt.Errorf("proto: ContainerDelete: wiretype end group for non-group") 1271 } 1272 if fieldNum <= 0 { 1273 return fmt.Errorf("proto: ContainerDelete: illegal tag %d (wire type %d)", fieldNum, wire) 1274 } 1275 switch fieldNum { 1276 case 1: 1277 if wireType != 2 { 1278 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 1279 } 1280 var stringLen uint64 1281 for shift := uint(0); ; shift += 7 { 1282 if shift >= 64 { 1283 return ErrIntOverflowContainer 1284 } 1285 if iNdEx >= l { 1286 return io.ErrUnexpectedEOF 1287 } 1288 b := dAtA[iNdEx] 1289 iNdEx++ 1290 stringLen |= uint64(b&0x7F) << shift 1291 if b < 0x80 { 1292 break 1293 } 1294 } 1295 intStringLen := int(stringLen) 1296 if intStringLen < 0 { 1297 return ErrInvalidLengthContainer 1298 } 1299 postIndex := iNdEx + intStringLen 1300 if postIndex < 0 { 1301 return ErrInvalidLengthContainer 1302 } 1303 if postIndex > l { 1304 return io.ErrUnexpectedEOF 1305 } 1306 m.ID = string(dAtA[iNdEx:postIndex]) 1307 iNdEx = postIndex 1308 default: 1309 iNdEx = preIndex 1310 skippy, err := skipContainer(dAtA[iNdEx:]) 1311 if err != nil { 1312 return err 1313 } 1314 if (skippy < 0) || (iNdEx+skippy) < 0 { 1315 return ErrInvalidLengthContainer 1316 } 1317 if (iNdEx + skippy) > l { 1318 return io.ErrUnexpectedEOF 1319 } 1320 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1321 iNdEx += skippy 1322 } 1323 } 1324 1325 if iNdEx > l { 1326 return io.ErrUnexpectedEOF 1327 } 1328 return nil 1329 } 1330 func skipContainer(dAtA []byte) (n int, err error) { 1331 l := len(dAtA) 1332 iNdEx := 0 1333 depth := 0 1334 for iNdEx < l { 1335 var wire uint64 1336 for shift := uint(0); ; shift += 7 { 1337 if shift >= 64 { 1338 return 0, ErrIntOverflowContainer 1339 } 1340 if iNdEx >= l { 1341 return 0, io.ErrUnexpectedEOF 1342 } 1343 b := dAtA[iNdEx] 1344 iNdEx++ 1345 wire |= (uint64(b) & 0x7F) << shift 1346 if b < 0x80 { 1347 break 1348 } 1349 } 1350 wireType := int(wire & 0x7) 1351 switch wireType { 1352 case 0: 1353 for shift := uint(0); ; shift += 7 { 1354 if shift >= 64 { 1355 return 0, ErrIntOverflowContainer 1356 } 1357 if iNdEx >= l { 1358 return 0, io.ErrUnexpectedEOF 1359 } 1360 iNdEx++ 1361 if dAtA[iNdEx-1] < 0x80 { 1362 break 1363 } 1364 } 1365 case 1: 1366 iNdEx += 8 1367 case 2: 1368 var length int 1369 for shift := uint(0); ; shift += 7 { 1370 if shift >= 64 { 1371 return 0, ErrIntOverflowContainer 1372 } 1373 if iNdEx >= l { 1374 return 0, io.ErrUnexpectedEOF 1375 } 1376 b := dAtA[iNdEx] 1377 iNdEx++ 1378 length |= (int(b) & 0x7F) << shift 1379 if b < 0x80 { 1380 break 1381 } 1382 } 1383 if length < 0 { 1384 return 0, ErrInvalidLengthContainer 1385 } 1386 iNdEx += length 1387 case 3: 1388 depth++ 1389 case 4: 1390 if depth == 0 { 1391 return 0, ErrUnexpectedEndOfGroupContainer 1392 } 1393 depth-- 1394 case 5: 1395 iNdEx += 4 1396 default: 1397 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1398 } 1399 if iNdEx < 0 { 1400 return 0, ErrInvalidLengthContainer 1401 } 1402 if depth == 0 { 1403 return iNdEx, nil 1404 } 1405 } 1406 return 0, io.ErrUnexpectedEOF 1407 } 1408 1409 var ( 1410 ErrInvalidLengthContainer = fmt.Errorf("proto: negative length found during unmarshaling") 1411 ErrIntOverflowContainer = fmt.Errorf("proto: integer overflow") 1412 ErrUnexpectedEndOfGroupContainer = fmt.Errorf("proto: unexpected end of group") 1413 )