api.pb.go 15 KB

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