api.pb.go 17 KB

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