api.pb.go 15 KB

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