github.com/containerd/Containerd@v1.4.13/api/events/namespace.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/containerd/containerd/api/events/namespace.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 NamespaceCreate 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 *NamespaceCreate) Reset() { *m = NamespaceCreate{} } 37 func (*NamespaceCreate) ProtoMessage() {} 38 func (*NamespaceCreate) Descriptor() ([]byte, []int) { 39 return fileDescriptor_6cd45d1d5adffe29, []int{0} 40 } 41 func (m *NamespaceCreate) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *NamespaceCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 if deterministic { 46 return xxx_messageInfo_NamespaceCreate.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 *NamespaceCreate) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_NamespaceCreate.Merge(m, src) 58 } 59 func (m *NamespaceCreate) XXX_Size() int { 60 return m.Size() 61 } 62 func (m *NamespaceCreate) XXX_DiscardUnknown() { 63 xxx_messageInfo_NamespaceCreate.DiscardUnknown(m) 64 } 65 66 var xxx_messageInfo_NamespaceCreate proto.InternalMessageInfo 67 68 type NamespaceUpdate 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 *NamespaceUpdate) Reset() { *m = NamespaceUpdate{} } 77 func (*NamespaceUpdate) ProtoMessage() {} 78 func (*NamespaceUpdate) Descriptor() ([]byte, []int) { 79 return fileDescriptor_6cd45d1d5adffe29, []int{1} 80 } 81 func (m *NamespaceUpdate) XXX_Unmarshal(b []byte) error { 82 return m.Unmarshal(b) 83 } 84 func (m *NamespaceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 85 if deterministic { 86 return xxx_messageInfo_NamespaceUpdate.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 *NamespaceUpdate) XXX_Merge(src proto.Message) { 97 xxx_messageInfo_NamespaceUpdate.Merge(m, src) 98 } 99 func (m *NamespaceUpdate) XXX_Size() int { 100 return m.Size() 101 } 102 func (m *NamespaceUpdate) XXX_DiscardUnknown() { 103 xxx_messageInfo_NamespaceUpdate.DiscardUnknown(m) 104 } 105 106 var xxx_messageInfo_NamespaceUpdate proto.InternalMessageInfo 107 108 type NamespaceDelete 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 *NamespaceDelete) Reset() { *m = NamespaceDelete{} } 116 func (*NamespaceDelete) ProtoMessage() {} 117 func (*NamespaceDelete) Descriptor() ([]byte, []int) { 118 return fileDescriptor_6cd45d1d5adffe29, []int{2} 119 } 120 func (m *NamespaceDelete) XXX_Unmarshal(b []byte) error { 121 return m.Unmarshal(b) 122 } 123 func (m *NamespaceDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 124 if deterministic { 125 return xxx_messageInfo_NamespaceDelete.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 *NamespaceDelete) XXX_Merge(src proto.Message) { 136 xxx_messageInfo_NamespaceDelete.Merge(m, src) 137 } 138 func (m *NamespaceDelete) XXX_Size() int { 139 return m.Size() 140 } 141 func (m *NamespaceDelete) XXX_DiscardUnknown() { 142 xxx_messageInfo_NamespaceDelete.DiscardUnknown(m) 143 } 144 145 var xxx_messageInfo_NamespaceDelete proto.InternalMessageInfo 146 147 func init() { 148 proto.RegisterType((*NamespaceCreate)(nil), "containerd.events.NamespaceCreate") 149 proto.RegisterMapType((map[string]string)(nil), "containerd.events.NamespaceCreate.LabelsEntry") 150 proto.RegisterType((*NamespaceUpdate)(nil), "containerd.events.NamespaceUpdate") 151 proto.RegisterMapType((map[string]string)(nil), "containerd.events.NamespaceUpdate.LabelsEntry") 152 proto.RegisterType((*NamespaceDelete)(nil), "containerd.events.NamespaceDelete") 153 } 154 155 func init() { 156 proto.RegisterFile("github.com/containerd/containerd/api/events/namespace.proto", fileDescriptor_6cd45d1d5adffe29) 157 } 158 159 var fileDescriptor_6cd45d1d5adffe29 = []byte{ 160 // 296 bytes of a gzipped FileDescriptorProto 161 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 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, 0xe7, 0x25, 164 0xe6, 0xa6, 0x16, 0x17, 0x24, 0x26, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x22, 165 0x94, 0xe9, 0x41, 0x94, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88, 166 0x42, 0x29, 0x07, 0x82, 0xb6, 0x80, 0xd5, 0x25, 0x95, 0xa6, 0xe9, 0x17, 0xe4, 0x94, 0xa6, 0x67, 167 0xe6, 0xe9, 0xa7, 0x65, 0xa6, 0xe6, 0xa4, 0x14, 0x24, 0x96, 0x64, 0x40, 0x4c, 0x50, 0x5a, 0xc1, 168 0xc8, 0xc5, 0xef, 0x07, 0xb3, 0xde, 0xb9, 0x28, 0x35, 0xb1, 0x24, 0x55, 0x48, 0x88, 0x8b, 0x05, 169 0xe4, 0x22, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x30, 0x5b, 0xc8, 0x8d, 0x8b, 0x2d, 0x27, 170 0x31, 0x29, 0x35, 0xa7, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x4f, 0x0f, 0xc3, 0x8d, 171 0x7a, 0x68, 0xe6, 0xe8, 0xf9, 0x80, 0x35, 0xb8, 0xe6, 0x95, 0x14, 0x55, 0x06, 0x41, 0x75, 0x4b, 172 0x59, 0x72, 0x71, 0x23, 0x09, 0x0b, 0x09, 0x70, 0x31, 0x67, 0xa7, 0x56, 0x42, 0x6d, 0x02, 0x31, 173 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x12, 0x73, 0x4a, 0x53, 0x25, 0x98, 0xc0, 0x62, 0x10, 0x8e, 0x15, 174 0x93, 0x05, 0x23, 0xaa, 0x53, 0x43, 0x0b, 0x52, 0xa8, 0xe2, 0x54, 0x88, 0x39, 0xd4, 0x76, 0xaa, 175 0x2a, 0x92, 0x4b, 0x5d, 0x52, 0x73, 0x52, 0xb1, 0xbb, 0xd4, 0x29, 0xe0, 0xc4, 0x43, 0x39, 0x86, 176 0x1b, 0x0f, 0xe5, 0x18, 0x1a, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 177 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x0b, 0xbe, 0xc8, 0x31, 0x46, 0x19, 0x91, 0x90, 0x84, 0xac, 0x21, 178 0x54, 0x04, 0x43, 0x04, 0x63, 0x12, 0x1b, 0x38, 0x66, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 179 0x00, 0x50, 0x87, 0x59, 0x83, 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 *NamespaceCreate) 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 *NamespaceUpdate) 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 *NamespaceDelete) 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 *NamespaceCreate) 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 *NamespaceCreate) MarshalTo(dAtA []byte) (int, error) { 250 size := m.Size() 251 return m.MarshalToSizedBuffer(dAtA[:size]) 252 } 253 254 func (m *NamespaceCreate) 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 = encodeVarintNamespace(dAtA, i, uint64(len(v))) 270 i-- 271 dAtA[i] = 0x12 272 i -= len(k) 273 copy(dAtA[i:], k) 274 i = encodeVarintNamespace(dAtA, i, uint64(len(k))) 275 i-- 276 dAtA[i] = 0xa 277 i = encodeVarintNamespace(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 = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) 286 i-- 287 dAtA[i] = 0xa 288 } 289 return len(dAtA) - i, nil 290 } 291 292 func (m *NamespaceUpdate) 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 *NamespaceUpdate) MarshalTo(dAtA []byte) (int, error) { 303 size := m.Size() 304 return m.MarshalToSizedBuffer(dAtA[:size]) 305 } 306 307 func (m *NamespaceUpdate) 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 = encodeVarintNamespace(dAtA, i, uint64(len(v))) 323 i-- 324 dAtA[i] = 0x12 325 i -= len(k) 326 copy(dAtA[i:], k) 327 i = encodeVarintNamespace(dAtA, i, uint64(len(k))) 328 i-- 329 dAtA[i] = 0xa 330 i = encodeVarintNamespace(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 = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) 339 i-- 340 dAtA[i] = 0xa 341 } 342 return len(dAtA) - i, nil 343 } 344 345 func (m *NamespaceDelete) 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 *NamespaceDelete) MarshalTo(dAtA []byte) (int, error) { 356 size := m.Size() 357 return m.MarshalToSizedBuffer(dAtA[:size]) 358 } 359 360 func (m *NamespaceDelete) 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 = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) 373 i-- 374 dAtA[i] = 0xa 375 } 376 return len(dAtA) - i, nil 377 } 378 379 func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { 380 offset -= sovNamespace(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 *NamespaceCreate) 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 + sovNamespace(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) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) 405 n += mapEntrySize + 1 + sovNamespace(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 *NamespaceUpdate) 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 + sovNamespace(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) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) 429 n += mapEntrySize + 1 + sovNamespace(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 *NamespaceDelete) 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 + sovNamespace(uint64(l)) 447 } 448 if m.XXX_unrecognized != nil { 449 n += len(m.XXX_unrecognized) 450 } 451 return n 452 } 453 454 func sovNamespace(x uint64) (n int) { 455 return (math_bits.Len64(x|1) + 6) / 7 456 } 457 func sozNamespace(x uint64) (n int) { 458 return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 459 } 460 func (this *NamespaceCreate) 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{`&NamespaceCreate{`, 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 *NamespaceUpdate) 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{`&NamespaceUpdate{`, 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 *NamespaceDelete) String() string { 505 if this == nil { 506 return "nil" 507 } 508 s := strings.Join([]string{`&NamespaceDelete{`, 509 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 510 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 511 `}`, 512 }, "") 513 return s 514 } 515 func valueToStringNamespace(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 *NamespaceCreate) 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 ErrIntOverflowNamespace 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: NamespaceCreate: wiretype end group for non-group") 547 } 548 if fieldNum <= 0 { 549 return fmt.Errorf("proto: NamespaceCreate: 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 ErrIntOverflowNamespace 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 ErrInvalidLengthNamespace 574 } 575 postIndex := iNdEx + intStringLen 576 if postIndex < 0 { 577 return ErrInvalidLengthNamespace 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 ErrIntOverflowNamespace 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 ErrInvalidLengthNamespace 605 } 606 postIndex := iNdEx + msglen 607 if postIndex < 0 { 608 return ErrInvalidLengthNamespace 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 ErrIntOverflowNamespace 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 ErrIntOverflowNamespace 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 ErrInvalidLengthNamespace 655 } 656 postStringIndexmapkey := iNdEx + intStringLenmapkey 657 if postStringIndexmapkey < 0 { 658 return ErrInvalidLengthNamespace 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 ErrIntOverflowNamespace 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 ErrInvalidLengthNamespace 684 } 685 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 686 if postStringIndexmapvalue < 0 { 687 return ErrInvalidLengthNamespace 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 := skipNamespace(dAtA[iNdEx:]) 697 if err != nil { 698 return err 699 } 700 if (skippy < 0) || (iNdEx+skippy) < 0 { 701 return ErrInvalidLengthNamespace 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 := skipNamespace(dAtA[iNdEx:]) 714 if err != nil { 715 return err 716 } 717 if (skippy < 0) || (iNdEx+skippy) < 0 { 718 return ErrInvalidLengthNamespace 719 } 720 if (iNdEx + skippy) > l { 721 return io.ErrUnexpectedEOF 722 } 723 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 724 iNdEx += skippy 725 } 726 } 727 728 if iNdEx > l { 729 return io.ErrUnexpectedEOF 730 } 731 return nil 732 } 733 func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error { 734 l := len(dAtA) 735 iNdEx := 0 736 for iNdEx < l { 737 preIndex := iNdEx 738 var wire uint64 739 for shift := uint(0); ; shift += 7 { 740 if shift >= 64 { 741 return ErrIntOverflowNamespace 742 } 743 if iNdEx >= l { 744 return io.ErrUnexpectedEOF 745 } 746 b := dAtA[iNdEx] 747 iNdEx++ 748 wire |= uint64(b&0x7F) << shift 749 if b < 0x80 { 750 break 751 } 752 } 753 fieldNum := int32(wire >> 3) 754 wireType := int(wire & 0x7) 755 if wireType == 4 { 756 return fmt.Errorf("proto: NamespaceUpdate: wiretype end group for non-group") 757 } 758 if fieldNum <= 0 { 759 return fmt.Errorf("proto: NamespaceUpdate: illegal tag %d (wire type %d)", fieldNum, wire) 760 } 761 switch fieldNum { 762 case 1: 763 if wireType != 2 { 764 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 765 } 766 var stringLen uint64 767 for shift := uint(0); ; shift += 7 { 768 if shift >= 64 { 769 return ErrIntOverflowNamespace 770 } 771 if iNdEx >= l { 772 return io.ErrUnexpectedEOF 773 } 774 b := dAtA[iNdEx] 775 iNdEx++ 776 stringLen |= uint64(b&0x7F) << shift 777 if b < 0x80 { 778 break 779 } 780 } 781 intStringLen := int(stringLen) 782 if intStringLen < 0 { 783 return ErrInvalidLengthNamespace 784 } 785 postIndex := iNdEx + intStringLen 786 if postIndex < 0 { 787 return ErrInvalidLengthNamespace 788 } 789 if postIndex > l { 790 return io.ErrUnexpectedEOF 791 } 792 m.Name = string(dAtA[iNdEx:postIndex]) 793 iNdEx = postIndex 794 case 2: 795 if wireType != 2 { 796 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 797 } 798 var msglen int 799 for shift := uint(0); ; shift += 7 { 800 if shift >= 64 { 801 return ErrIntOverflowNamespace 802 } 803 if iNdEx >= l { 804 return io.ErrUnexpectedEOF 805 } 806 b := dAtA[iNdEx] 807 iNdEx++ 808 msglen |= int(b&0x7F) << shift 809 if b < 0x80 { 810 break 811 } 812 } 813 if msglen < 0 { 814 return ErrInvalidLengthNamespace 815 } 816 postIndex := iNdEx + msglen 817 if postIndex < 0 { 818 return ErrInvalidLengthNamespace 819 } 820 if postIndex > l { 821 return io.ErrUnexpectedEOF 822 } 823 if m.Labels == nil { 824 m.Labels = make(map[string]string) 825 } 826 var mapkey string 827 var mapvalue string 828 for iNdEx < postIndex { 829 entryPreIndex := iNdEx 830 var wire uint64 831 for shift := uint(0); ; shift += 7 { 832 if shift >= 64 { 833 return ErrIntOverflowNamespace 834 } 835 if iNdEx >= l { 836 return io.ErrUnexpectedEOF 837 } 838 b := dAtA[iNdEx] 839 iNdEx++ 840 wire |= uint64(b&0x7F) << shift 841 if b < 0x80 { 842 break 843 } 844 } 845 fieldNum := int32(wire >> 3) 846 if fieldNum == 1 { 847 var stringLenmapkey uint64 848 for shift := uint(0); ; shift += 7 { 849 if shift >= 64 { 850 return ErrIntOverflowNamespace 851 } 852 if iNdEx >= l { 853 return io.ErrUnexpectedEOF 854 } 855 b := dAtA[iNdEx] 856 iNdEx++ 857 stringLenmapkey |= uint64(b&0x7F) << shift 858 if b < 0x80 { 859 break 860 } 861 } 862 intStringLenmapkey := int(stringLenmapkey) 863 if intStringLenmapkey < 0 { 864 return ErrInvalidLengthNamespace 865 } 866 postStringIndexmapkey := iNdEx + intStringLenmapkey 867 if postStringIndexmapkey < 0 { 868 return ErrInvalidLengthNamespace 869 } 870 if postStringIndexmapkey > l { 871 return io.ErrUnexpectedEOF 872 } 873 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 874 iNdEx = postStringIndexmapkey 875 } else if fieldNum == 2 { 876 var stringLenmapvalue uint64 877 for shift := uint(0); ; shift += 7 { 878 if shift >= 64 { 879 return ErrIntOverflowNamespace 880 } 881 if iNdEx >= l { 882 return io.ErrUnexpectedEOF 883 } 884 b := dAtA[iNdEx] 885 iNdEx++ 886 stringLenmapvalue |= uint64(b&0x7F) << shift 887 if b < 0x80 { 888 break 889 } 890 } 891 intStringLenmapvalue := int(stringLenmapvalue) 892 if intStringLenmapvalue < 0 { 893 return ErrInvalidLengthNamespace 894 } 895 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 896 if postStringIndexmapvalue < 0 { 897 return ErrInvalidLengthNamespace 898 } 899 if postStringIndexmapvalue > l { 900 return io.ErrUnexpectedEOF 901 } 902 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 903 iNdEx = postStringIndexmapvalue 904 } else { 905 iNdEx = entryPreIndex 906 skippy, err := skipNamespace(dAtA[iNdEx:]) 907 if err != nil { 908 return err 909 } 910 if (skippy < 0) || (iNdEx+skippy) < 0 { 911 return ErrInvalidLengthNamespace 912 } 913 if (iNdEx + skippy) > postIndex { 914 return io.ErrUnexpectedEOF 915 } 916 iNdEx += skippy 917 } 918 } 919 m.Labels[mapkey] = mapvalue 920 iNdEx = postIndex 921 default: 922 iNdEx = preIndex 923 skippy, err := skipNamespace(dAtA[iNdEx:]) 924 if err != nil { 925 return err 926 } 927 if (skippy < 0) || (iNdEx+skippy) < 0 { 928 return ErrInvalidLengthNamespace 929 } 930 if (iNdEx + skippy) > l { 931 return io.ErrUnexpectedEOF 932 } 933 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 934 iNdEx += skippy 935 } 936 } 937 938 if iNdEx > l { 939 return io.ErrUnexpectedEOF 940 } 941 return nil 942 } 943 func (m *NamespaceDelete) Unmarshal(dAtA []byte) error { 944 l := len(dAtA) 945 iNdEx := 0 946 for iNdEx < l { 947 preIndex := iNdEx 948 var wire uint64 949 for shift := uint(0); ; shift += 7 { 950 if shift >= 64 { 951 return ErrIntOverflowNamespace 952 } 953 if iNdEx >= l { 954 return io.ErrUnexpectedEOF 955 } 956 b := dAtA[iNdEx] 957 iNdEx++ 958 wire |= uint64(b&0x7F) << shift 959 if b < 0x80 { 960 break 961 } 962 } 963 fieldNum := int32(wire >> 3) 964 wireType := int(wire & 0x7) 965 if wireType == 4 { 966 return fmt.Errorf("proto: NamespaceDelete: wiretype end group for non-group") 967 } 968 if fieldNum <= 0 { 969 return fmt.Errorf("proto: NamespaceDelete: illegal tag %d (wire type %d)", fieldNum, wire) 970 } 971 switch fieldNum { 972 case 1: 973 if wireType != 2 { 974 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 975 } 976 var stringLen uint64 977 for shift := uint(0); ; shift += 7 { 978 if shift >= 64 { 979 return ErrIntOverflowNamespace 980 } 981 if iNdEx >= l { 982 return io.ErrUnexpectedEOF 983 } 984 b := dAtA[iNdEx] 985 iNdEx++ 986 stringLen |= uint64(b&0x7F) << shift 987 if b < 0x80 { 988 break 989 } 990 } 991 intStringLen := int(stringLen) 992 if intStringLen < 0 { 993 return ErrInvalidLengthNamespace 994 } 995 postIndex := iNdEx + intStringLen 996 if postIndex < 0 { 997 return ErrInvalidLengthNamespace 998 } 999 if postIndex > l { 1000 return io.ErrUnexpectedEOF 1001 } 1002 m.Name = string(dAtA[iNdEx:postIndex]) 1003 iNdEx = postIndex 1004 default: 1005 iNdEx = preIndex 1006 skippy, err := skipNamespace(dAtA[iNdEx:]) 1007 if err != nil { 1008 return err 1009 } 1010 if (skippy < 0) || (iNdEx+skippy) < 0 { 1011 return ErrInvalidLengthNamespace 1012 } 1013 if (iNdEx + skippy) > l { 1014 return io.ErrUnexpectedEOF 1015 } 1016 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1017 iNdEx += skippy 1018 } 1019 } 1020 1021 if iNdEx > l { 1022 return io.ErrUnexpectedEOF 1023 } 1024 return nil 1025 } 1026 func skipNamespace(dAtA []byte) (n int, err error) { 1027 l := len(dAtA) 1028 iNdEx := 0 1029 depth := 0 1030 for iNdEx < l { 1031 var wire uint64 1032 for shift := uint(0); ; shift += 7 { 1033 if shift >= 64 { 1034 return 0, ErrIntOverflowNamespace 1035 } 1036 if iNdEx >= l { 1037 return 0, io.ErrUnexpectedEOF 1038 } 1039 b := dAtA[iNdEx] 1040 iNdEx++ 1041 wire |= (uint64(b) & 0x7F) << shift 1042 if b < 0x80 { 1043 break 1044 } 1045 } 1046 wireType := int(wire & 0x7) 1047 switch wireType { 1048 case 0: 1049 for shift := uint(0); ; shift += 7 { 1050 if shift >= 64 { 1051 return 0, ErrIntOverflowNamespace 1052 } 1053 if iNdEx >= l { 1054 return 0, io.ErrUnexpectedEOF 1055 } 1056 iNdEx++ 1057 if dAtA[iNdEx-1] < 0x80 { 1058 break 1059 } 1060 } 1061 case 1: 1062 iNdEx += 8 1063 case 2: 1064 var length int 1065 for shift := uint(0); ; shift += 7 { 1066 if shift >= 64 { 1067 return 0, ErrIntOverflowNamespace 1068 } 1069 if iNdEx >= l { 1070 return 0, io.ErrUnexpectedEOF 1071 } 1072 b := dAtA[iNdEx] 1073 iNdEx++ 1074 length |= (int(b) & 0x7F) << shift 1075 if b < 0x80 { 1076 break 1077 } 1078 } 1079 if length < 0 { 1080 return 0, ErrInvalidLengthNamespace 1081 } 1082 iNdEx += length 1083 case 3: 1084 depth++ 1085 case 4: 1086 if depth == 0 { 1087 return 0, ErrUnexpectedEndOfGroupNamespace 1088 } 1089 depth-- 1090 case 5: 1091 iNdEx += 4 1092 default: 1093 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1094 } 1095 if iNdEx < 0 { 1096 return 0, ErrInvalidLengthNamespace 1097 } 1098 if depth == 0 { 1099 return iNdEx, nil 1100 } 1101 } 1102 return 0, io.ErrUnexpectedEOF 1103 } 1104 1105 var ( 1106 ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") 1107 ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") 1108 ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group") 1109 )