k8s.io/kubernetes@v1.29.3/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin_apis/v1beta2/api.pb.go (about) 1 /* 2 Copyright The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // Code generated by protoc-gen-gogo. DO NOT EDIT. 18 // source: api.proto 19 20 package v1beta2 21 22 import ( 23 context "context" 24 fmt "fmt" 25 _ "github.com/gogo/protobuf/gogoproto" 26 proto "github.com/gogo/protobuf/proto" 27 grpc "google.golang.org/grpc" 28 codes "google.golang.org/grpc/codes" 29 status "google.golang.org/grpc/status" 30 io "io" 31 math "math" 32 math_bits "math/bits" 33 reflect "reflect" 34 strings "strings" 35 ) 36 37 // Reference imports to suppress errors if they are not otherwise used. 38 var _ = proto.Marshal 39 var _ = fmt.Errorf 40 var _ = math.Inf 41 42 // This is a compile-time assertion to ensure that this generated file 43 // is compatible with the proto package it is being compiled against. 44 // A compilation error at this line likely means your copy of the 45 // proto package needs to be updated. 46 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 47 48 // Renames a field from v1beta1 ExampleRequest. 49 type ExampleRequest struct { 50 Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` 51 V1Beta2Field string `protobuf:"bytes,2,opt,name=v1beta2_field,json=v1beta2Field,proto3" json:"v1beta2_field,omitempty"` 52 XXX_NoUnkeyedLiteral struct{} `json:"-"` 53 XXX_sizecache int32 `json:"-"` 54 } 55 56 func (m *ExampleRequest) Reset() { *m = ExampleRequest{} } 57 func (*ExampleRequest) ProtoMessage() {} 58 func (*ExampleRequest) Descriptor() ([]byte, []int) { 59 return fileDescriptor_00212fb1f9d3bf1c, []int{0} 60 } 61 func (m *ExampleRequest) XXX_Unmarshal(b []byte) error { 62 return m.Unmarshal(b) 63 } 64 func (m *ExampleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 65 if deterministic { 66 return xxx_messageInfo_ExampleRequest.Marshal(b, m, deterministic) 67 } else { 68 b = b[:cap(b)] 69 n, err := m.MarshalToSizedBuffer(b) 70 if err != nil { 71 return nil, err 72 } 73 return b[:n], nil 74 } 75 } 76 func (m *ExampleRequest) XXX_Merge(src proto.Message) { 77 xxx_messageInfo_ExampleRequest.Merge(m, src) 78 } 79 func (m *ExampleRequest) XXX_Size() int { 80 return m.Size() 81 } 82 func (m *ExampleRequest) XXX_DiscardUnknown() { 83 xxx_messageInfo_ExampleRequest.DiscardUnknown(m) 84 } 85 86 var xxx_messageInfo_ExampleRequest proto.InternalMessageInfo 87 88 func (m *ExampleRequest) GetRequest() string { 89 if m != nil { 90 return m.Request 91 } 92 return "" 93 } 94 95 func (m *ExampleRequest) GetV1Beta2Field() string { 96 if m != nil { 97 return m.V1Beta2Field 98 } 99 return "" 100 } 101 102 type ExampleResponse struct { 103 Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` 104 XXX_NoUnkeyedLiteral struct{} `json:"-"` 105 XXX_sizecache int32 `json:"-"` 106 } 107 108 func (m *ExampleResponse) Reset() { *m = ExampleResponse{} } 109 func (*ExampleResponse) ProtoMessage() {} 110 func (*ExampleResponse) Descriptor() ([]byte, []int) { 111 return fileDescriptor_00212fb1f9d3bf1c, []int{1} 112 } 113 func (m *ExampleResponse) XXX_Unmarshal(b []byte) error { 114 return m.Unmarshal(b) 115 } 116 func (m *ExampleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 117 if deterministic { 118 return xxx_messageInfo_ExampleResponse.Marshal(b, m, deterministic) 119 } else { 120 b = b[:cap(b)] 121 n, err := m.MarshalToSizedBuffer(b) 122 if err != nil { 123 return nil, err 124 } 125 return b[:n], nil 126 } 127 } 128 func (m *ExampleResponse) XXX_Merge(src proto.Message) { 129 xxx_messageInfo_ExampleResponse.Merge(m, src) 130 } 131 func (m *ExampleResponse) XXX_Size() int { 132 return m.Size() 133 } 134 func (m *ExampleResponse) XXX_DiscardUnknown() { 135 xxx_messageInfo_ExampleResponse.DiscardUnknown(m) 136 } 137 138 var xxx_messageInfo_ExampleResponse proto.InternalMessageInfo 139 140 func (m *ExampleResponse) GetError() string { 141 if m != nil { 142 return m.Error 143 } 144 return "" 145 } 146 147 func init() { 148 proto.RegisterType((*ExampleRequest)(nil), "v1beta2.ExampleRequest") 149 proto.RegisterType((*ExampleResponse)(nil), "v1beta2.ExampleResponse") 150 } 151 152 func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } 153 154 var fileDescriptor_00212fb1f9d3bf1c = []byte{ 155 // 287 bytes of a gzipped FileDescriptorProto 156 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xbf, 0x4a, 0x34, 0x31, 157 0x14, 0xc5, 0x37, 0x1f, 0x7c, 0x2e, 0x1b, 0x74, 0x85, 0x20, 0x38, 0x6c, 0x11, 0x64, 0x2c, 0xb4, 158 0x71, 0x82, 0x6b, 0x63, 0x2d, 0xac, 0x62, 0xa5, 0x2c, 0xd8, 0xd8, 0x0c, 0x99, 0xf5, 0x4e, 0x36, 159 0xcc, 0x9f, 0xc4, 0x24, 0xa3, 0x96, 0x3e, 0x82, 0x8f, 0xb5, 0xa5, 0xa5, 0xa5, 0x3b, 0xbe, 0x88, 160 0x98, 0x44, 0x41, 0xec, 0xee, 0xef, 0x9c, 0xe4, 0x9c, 0xcb, 0xc5, 0x23, 0xae, 0x65, 0xa6, 0x8d, 161 0x72, 0x8a, 0x0c, 0x1f, 0x8e, 0x0b, 0x70, 0x7c, 0x3a, 0x39, 0x12, 0xd2, 0x2d, 0xbb, 0x22, 0x5b, 162 0xa8, 0x86, 0x09, 0x25, 0x14, 0xf3, 0x7e, 0xd1, 0x95, 0x9e, 0x3c, 0xf8, 0x29, 0xfc, 0x4b, 0xaf, 163 0xf0, 0x78, 0xf6, 0xc4, 0x1b, 0x5d, 0xc3, 0x1c, 0xee, 0x3b, 0xb0, 0x8e, 0x24, 0x78, 0x68, 0xc2, 164 0x98, 0xa0, 0x3d, 0x74, 0x38, 0x9a, 0x7f, 0x23, 0xd9, 0xc7, 0x5b, 0xb1, 0x25, 0x2f, 0x25, 0xd4, 165 0x77, 0xc9, 0x3f, 0xef, 0x6f, 0x46, 0xf1, 0xfc, 0x4b, 0x4b, 0x0f, 0xf0, 0xf6, 0x4f, 0xa0, 0xd5, 166 0xaa, 0xb5, 0x40, 0x76, 0xf0, 0x7f, 0x30, 0x46, 0x99, 0x98, 0x17, 0x60, 0x7a, 0x8d, 0x87, 0xf1, 167 0x21, 0x99, 0xe1, 0xf1, 0x05, 0xb8, 0x48, 0x97, 0x6d, 0xa9, 0xc8, 0x6e, 0x16, 0x43, 0xb3, 0xdf, 168 0xdb, 0x4d, 0x92, 0xbf, 0x46, 0x68, 0x49, 0x07, 0x67, 0x76, 0xb5, 0xa6, 0xe8, 0x6d, 0x4d, 0x07, 169 0xcf, 0x3d, 0x45, 0xab, 0x9e, 0xa2, 0xd7, 0x9e, 0xa2, 0xf7, 0x9e, 0xa2, 0x97, 0x0f, 0x3a, 0xb8, 170 0xbd, 0xa9, 0x4e, 0x6d, 0x26, 0x15, 0xab, 0xba, 0x02, 0x4c, 0x0b, 0x0e, 0x2c, 0xd3, 0x95, 0xf0, 171 0x58, 0x83, 0x63, 0xba, 0xee, 0x84, 0x6c, 0x1b, 0xde, 0x72, 0x01, 0x26, 0xd2, 0x23, 0x77, 0x8b, 172 0x25, 0x18, 0x06, 0xa1, 0x2a, 0x0f, 0x6a, 0xce, 0xb5, 0xb4, 0x2c, 0xae, 0x51, 0x6c, 0xf8, 0x3b, 173 0x9e, 0x7c, 0x06, 0x00, 0x00, 0xff, 0xff, 0x28, 0x67, 0xcf, 0xa3, 0x8c, 0x01, 0x00, 0x00, 174 } 175 176 // Reference imports to suppress errors if they are not otherwise used. 177 var _ context.Context 178 var _ grpc.ClientConn 179 180 // This is a compile-time assertion to ensure that this generated file 181 // is compatible with the grpc package it is being compiled against. 182 const _ = grpc.SupportPackageIsVersion4 183 184 // ExampleClient is the client API for Example service. 185 // 186 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 187 type ExampleClient interface { 188 GetExampleInfo(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error) 189 } 190 191 type exampleClient struct { 192 cc *grpc.ClientConn 193 } 194 195 func NewExampleClient(cc *grpc.ClientConn) ExampleClient { 196 return &exampleClient{cc} 197 } 198 199 func (c *exampleClient) GetExampleInfo(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error) { 200 out := new(ExampleResponse) 201 err := c.cc.Invoke(ctx, "/v1beta2.Example/GetExampleInfo", in, out, opts...) 202 if err != nil { 203 return nil, err 204 } 205 return out, nil 206 } 207 208 // ExampleServer is the server API for Example service. 209 type ExampleServer interface { 210 GetExampleInfo(context.Context, *ExampleRequest) (*ExampleResponse, error) 211 } 212 213 // UnimplementedExampleServer can be embedded to have forward compatible implementations. 214 type UnimplementedExampleServer struct { 215 } 216 217 func (*UnimplementedExampleServer) GetExampleInfo(ctx context.Context, req *ExampleRequest) (*ExampleResponse, error) { 218 return nil, status.Errorf(codes.Unimplemented, "method GetExampleInfo not implemented") 219 } 220 221 func RegisterExampleServer(s *grpc.Server, srv ExampleServer) { 222 s.RegisterService(&_Example_serviceDesc, srv) 223 } 224 225 func _Example_GetExampleInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 226 in := new(ExampleRequest) 227 if err := dec(in); err != nil { 228 return nil, err 229 } 230 if interceptor == nil { 231 return srv.(ExampleServer).GetExampleInfo(ctx, in) 232 } 233 info := &grpc.UnaryServerInfo{ 234 Server: srv, 235 FullMethod: "/v1beta2.Example/GetExampleInfo", 236 } 237 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 238 return srv.(ExampleServer).GetExampleInfo(ctx, req.(*ExampleRequest)) 239 } 240 return interceptor(ctx, in, info, handler) 241 } 242 243 var _Example_serviceDesc = grpc.ServiceDesc{ 244 ServiceName: "v1beta2.Example", 245 HandlerType: (*ExampleServer)(nil), 246 Methods: []grpc.MethodDesc{ 247 { 248 MethodName: "GetExampleInfo", 249 Handler: _Example_GetExampleInfo_Handler, 250 }, 251 }, 252 Streams: []grpc.StreamDesc{}, 253 Metadata: "api.proto", 254 } 255 256 func (m *ExampleRequest) Marshal() (dAtA []byte, err error) { 257 size := m.Size() 258 dAtA = make([]byte, size) 259 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 260 if err != nil { 261 return nil, err 262 } 263 return dAtA[:n], nil 264 } 265 266 func (m *ExampleRequest) MarshalTo(dAtA []byte) (int, error) { 267 size := m.Size() 268 return m.MarshalToSizedBuffer(dAtA[:size]) 269 } 270 271 func (m *ExampleRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 272 i := len(dAtA) 273 _ = i 274 var l int 275 _ = l 276 if len(m.V1Beta2Field) > 0 { 277 i -= len(m.V1Beta2Field) 278 copy(dAtA[i:], m.V1Beta2Field) 279 i = encodeVarintApi(dAtA, i, uint64(len(m.V1Beta2Field))) 280 i-- 281 dAtA[i] = 0x12 282 } 283 if len(m.Request) > 0 { 284 i -= len(m.Request) 285 copy(dAtA[i:], m.Request) 286 i = encodeVarintApi(dAtA, i, uint64(len(m.Request))) 287 i-- 288 dAtA[i] = 0xa 289 } 290 return len(dAtA) - i, nil 291 } 292 293 func (m *ExampleResponse) Marshal() (dAtA []byte, err error) { 294 size := m.Size() 295 dAtA = make([]byte, size) 296 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 297 if err != nil { 298 return nil, err 299 } 300 return dAtA[:n], nil 301 } 302 303 func (m *ExampleResponse) MarshalTo(dAtA []byte) (int, error) { 304 size := m.Size() 305 return m.MarshalToSizedBuffer(dAtA[:size]) 306 } 307 308 func (m *ExampleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 309 i := len(dAtA) 310 _ = i 311 var l int 312 _ = l 313 if len(m.Error) > 0 { 314 i -= len(m.Error) 315 copy(dAtA[i:], m.Error) 316 i = encodeVarintApi(dAtA, i, uint64(len(m.Error))) 317 i-- 318 dAtA[i] = 0xa 319 } 320 return len(dAtA) - i, nil 321 } 322 323 func encodeVarintApi(dAtA []byte, offset int, v uint64) int { 324 offset -= sovApi(v) 325 base := offset 326 for v >= 1<<7 { 327 dAtA[offset] = uint8(v&0x7f | 0x80) 328 v >>= 7 329 offset++ 330 } 331 dAtA[offset] = uint8(v) 332 return base 333 } 334 func (m *ExampleRequest) Size() (n int) { 335 if m == nil { 336 return 0 337 } 338 var l int 339 _ = l 340 l = len(m.Request) 341 if l > 0 { 342 n += 1 + l + sovApi(uint64(l)) 343 } 344 l = len(m.V1Beta2Field) 345 if l > 0 { 346 n += 1 + l + sovApi(uint64(l)) 347 } 348 return n 349 } 350 351 func (m *ExampleResponse) Size() (n int) { 352 if m == nil { 353 return 0 354 } 355 var l int 356 _ = l 357 l = len(m.Error) 358 if l > 0 { 359 n += 1 + l + sovApi(uint64(l)) 360 } 361 return n 362 } 363 364 func sovApi(x uint64) (n int) { 365 return (math_bits.Len64(x|1) + 6) / 7 366 } 367 func sozApi(x uint64) (n int) { 368 return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 369 } 370 func (this *ExampleRequest) String() string { 371 if this == nil { 372 return "nil" 373 } 374 s := strings.Join([]string{`&ExampleRequest{`, 375 `Request:` + fmt.Sprintf("%v", this.Request) + `,`, 376 `V1Beta2Field:` + fmt.Sprintf("%v", this.V1Beta2Field) + `,`, 377 `}`, 378 }, "") 379 return s 380 } 381 func (this *ExampleResponse) String() string { 382 if this == nil { 383 return "nil" 384 } 385 s := strings.Join([]string{`&ExampleResponse{`, 386 `Error:` + fmt.Sprintf("%v", this.Error) + `,`, 387 `}`, 388 }, "") 389 return s 390 } 391 func valueToStringApi(v interface{}) string { 392 rv := reflect.ValueOf(v) 393 if rv.IsNil() { 394 return "nil" 395 } 396 pv := reflect.Indirect(rv).Interface() 397 return fmt.Sprintf("*%v", pv) 398 } 399 func (m *ExampleRequest) Unmarshal(dAtA []byte) error { 400 l := len(dAtA) 401 iNdEx := 0 402 for iNdEx < l { 403 preIndex := iNdEx 404 var wire uint64 405 for shift := uint(0); ; shift += 7 { 406 if shift >= 64 { 407 return ErrIntOverflowApi 408 } 409 if iNdEx >= l { 410 return io.ErrUnexpectedEOF 411 } 412 b := dAtA[iNdEx] 413 iNdEx++ 414 wire |= uint64(b&0x7F) << shift 415 if b < 0x80 { 416 break 417 } 418 } 419 fieldNum := int32(wire >> 3) 420 wireType := int(wire & 0x7) 421 if wireType == 4 { 422 return fmt.Errorf("proto: ExampleRequest: wiretype end group for non-group") 423 } 424 if fieldNum <= 0 { 425 return fmt.Errorf("proto: ExampleRequest: illegal tag %d (wire type %d)", fieldNum, wire) 426 } 427 switch fieldNum { 428 case 1: 429 if wireType != 2 { 430 return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) 431 } 432 var stringLen uint64 433 for shift := uint(0); ; shift += 7 { 434 if shift >= 64 { 435 return ErrIntOverflowApi 436 } 437 if iNdEx >= l { 438 return io.ErrUnexpectedEOF 439 } 440 b := dAtA[iNdEx] 441 iNdEx++ 442 stringLen |= uint64(b&0x7F) << shift 443 if b < 0x80 { 444 break 445 } 446 } 447 intStringLen := int(stringLen) 448 if intStringLen < 0 { 449 return ErrInvalidLengthApi 450 } 451 postIndex := iNdEx + intStringLen 452 if postIndex < 0 { 453 return ErrInvalidLengthApi 454 } 455 if postIndex > l { 456 return io.ErrUnexpectedEOF 457 } 458 m.Request = string(dAtA[iNdEx:postIndex]) 459 iNdEx = postIndex 460 case 2: 461 if wireType != 2 { 462 return fmt.Errorf("proto: wrong wireType = %d for field V1Beta2Field", wireType) 463 } 464 var stringLen uint64 465 for shift := uint(0); ; shift += 7 { 466 if shift >= 64 { 467 return ErrIntOverflowApi 468 } 469 if iNdEx >= l { 470 return io.ErrUnexpectedEOF 471 } 472 b := dAtA[iNdEx] 473 iNdEx++ 474 stringLen |= uint64(b&0x7F) << shift 475 if b < 0x80 { 476 break 477 } 478 } 479 intStringLen := int(stringLen) 480 if intStringLen < 0 { 481 return ErrInvalidLengthApi 482 } 483 postIndex := iNdEx + intStringLen 484 if postIndex < 0 { 485 return ErrInvalidLengthApi 486 } 487 if postIndex > l { 488 return io.ErrUnexpectedEOF 489 } 490 m.V1Beta2Field = string(dAtA[iNdEx:postIndex]) 491 iNdEx = postIndex 492 default: 493 iNdEx = preIndex 494 skippy, err := skipApi(dAtA[iNdEx:]) 495 if err != nil { 496 return err 497 } 498 if (skippy < 0) || (iNdEx+skippy) < 0 { 499 return ErrInvalidLengthApi 500 } 501 if (iNdEx + skippy) > l { 502 return io.ErrUnexpectedEOF 503 } 504 iNdEx += skippy 505 } 506 } 507 508 if iNdEx > l { 509 return io.ErrUnexpectedEOF 510 } 511 return nil 512 } 513 func (m *ExampleResponse) Unmarshal(dAtA []byte) error { 514 l := len(dAtA) 515 iNdEx := 0 516 for iNdEx < l { 517 preIndex := iNdEx 518 var wire uint64 519 for shift := uint(0); ; shift += 7 { 520 if shift >= 64 { 521 return ErrIntOverflowApi 522 } 523 if iNdEx >= l { 524 return io.ErrUnexpectedEOF 525 } 526 b := dAtA[iNdEx] 527 iNdEx++ 528 wire |= uint64(b&0x7F) << shift 529 if b < 0x80 { 530 break 531 } 532 } 533 fieldNum := int32(wire >> 3) 534 wireType := int(wire & 0x7) 535 if wireType == 4 { 536 return fmt.Errorf("proto: ExampleResponse: wiretype end group for non-group") 537 } 538 if fieldNum <= 0 { 539 return fmt.Errorf("proto: ExampleResponse: illegal tag %d (wire type %d)", fieldNum, wire) 540 } 541 switch fieldNum { 542 case 1: 543 if wireType != 2 { 544 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 545 } 546 var stringLen uint64 547 for shift := uint(0); ; shift += 7 { 548 if shift >= 64 { 549 return ErrIntOverflowApi 550 } 551 if iNdEx >= l { 552 return io.ErrUnexpectedEOF 553 } 554 b := dAtA[iNdEx] 555 iNdEx++ 556 stringLen |= uint64(b&0x7F) << shift 557 if b < 0x80 { 558 break 559 } 560 } 561 intStringLen := int(stringLen) 562 if intStringLen < 0 { 563 return ErrInvalidLengthApi 564 } 565 postIndex := iNdEx + intStringLen 566 if postIndex < 0 { 567 return ErrInvalidLengthApi 568 } 569 if postIndex > l { 570 return io.ErrUnexpectedEOF 571 } 572 m.Error = string(dAtA[iNdEx:postIndex]) 573 iNdEx = postIndex 574 default: 575 iNdEx = preIndex 576 skippy, err := skipApi(dAtA[iNdEx:]) 577 if err != nil { 578 return err 579 } 580 if (skippy < 0) || (iNdEx+skippy) < 0 { 581 return ErrInvalidLengthApi 582 } 583 if (iNdEx + skippy) > l { 584 return io.ErrUnexpectedEOF 585 } 586 iNdEx += skippy 587 } 588 } 589 590 if iNdEx > l { 591 return io.ErrUnexpectedEOF 592 } 593 return nil 594 } 595 func skipApi(dAtA []byte) (n int, err error) { 596 l := len(dAtA) 597 iNdEx := 0 598 depth := 0 599 for iNdEx < l { 600 var wire uint64 601 for shift := uint(0); ; shift += 7 { 602 if shift >= 64 { 603 return 0, ErrIntOverflowApi 604 } 605 if iNdEx >= l { 606 return 0, io.ErrUnexpectedEOF 607 } 608 b := dAtA[iNdEx] 609 iNdEx++ 610 wire |= (uint64(b) & 0x7F) << shift 611 if b < 0x80 { 612 break 613 } 614 } 615 wireType := int(wire & 0x7) 616 switch wireType { 617 case 0: 618 for shift := uint(0); ; shift += 7 { 619 if shift >= 64 { 620 return 0, ErrIntOverflowApi 621 } 622 if iNdEx >= l { 623 return 0, io.ErrUnexpectedEOF 624 } 625 iNdEx++ 626 if dAtA[iNdEx-1] < 0x80 { 627 break 628 } 629 } 630 case 1: 631 iNdEx += 8 632 case 2: 633 var length int 634 for shift := uint(0); ; shift += 7 { 635 if shift >= 64 { 636 return 0, ErrIntOverflowApi 637 } 638 if iNdEx >= l { 639 return 0, io.ErrUnexpectedEOF 640 } 641 b := dAtA[iNdEx] 642 iNdEx++ 643 length |= (int(b) & 0x7F) << shift 644 if b < 0x80 { 645 break 646 } 647 } 648 if length < 0 { 649 return 0, ErrInvalidLengthApi 650 } 651 iNdEx += length 652 case 3: 653 depth++ 654 case 4: 655 if depth == 0 { 656 return 0, ErrUnexpectedEndOfGroupApi 657 } 658 depth-- 659 case 5: 660 iNdEx += 4 661 default: 662 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 663 } 664 if iNdEx < 0 { 665 return 0, ErrInvalidLengthApi 666 } 667 if depth == 0 { 668 return iNdEx, nil 669 } 670 } 671 return 0, io.ErrUnexpectedEOF 672 } 673 674 var ( 675 ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") 676 ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") 677 ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") 678 )