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