api.pb.go 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009
  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 pluginregistration is a generated protocol buffer package.
  17. It is generated from these files:
  18. api.proto
  19. It has these top-level messages:
  20. PluginInfo
  21. RegistrationStatus
  22. RegistrationStatusResponse
  23. InfoRequest
  24. */
  25. package pluginregistration
  26. import proto "github.com/gogo/protobuf/proto"
  27. import fmt "fmt"
  28. import math "math"
  29. import _ "github.com/gogo/protobuf/gogoproto"
  30. import (
  31. context "golang.org/x/net/context"
  32. grpc "google.golang.org/grpc"
  33. )
  34. import strings "strings"
  35. import reflect "reflect"
  36. import io "io"
  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. // This is a compile-time assertion to ensure that this generated file
  42. // is compatible with the proto package it is being compiled against.
  43. // A compilation error at this line likely means your copy of the
  44. // proto package needs to be updated.
  45. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  46. // PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration
  47. type PluginInfo struct {
  48. // Type of the Plugin. CSIPlugin or DevicePlugin
  49. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  50. // Plugin name that uniquely identifies the plugin for the given plugin type.
  51. // For DevicePlugin, this is the resource name that the plugin manages and
  52. // should follow the extended resource name convention.
  53. // For CSI, this is the CSI driver registrar name.
  54. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  55. // Optional endpoint location. If found set by Kubelet component,
  56. // Kubelet component will use this endpoint for specific requests.
  57. // This allows the plugin to register using one endpoint and possibly use
  58. // a different socket for control operations. CSI uses this model to delegate
  59. // its registration external from the plugin.
  60. Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
  61. // Plugin service API versions the plugin supports.
  62. // For DevicePlugin, this maps to the deviceplugin API versions the
  63. // plugin supports at the given socket.
  64. // The Kubelet component communicating with the plugin should be able
  65. // to choose any preferred version from this list, or returns an error
  66. // if none of the listed versions is supported.
  67. SupportedVersions []string `protobuf:"bytes,4,rep,name=supported_versions,json=supportedVersions" json:"supported_versions,omitempty"`
  68. }
  69. func (m *PluginInfo) Reset() { *m = PluginInfo{} }
  70. func (*PluginInfo) ProtoMessage() {}
  71. func (*PluginInfo) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
  72. func (m *PluginInfo) GetType() string {
  73. if m != nil {
  74. return m.Type
  75. }
  76. return ""
  77. }
  78. func (m *PluginInfo) GetName() string {
  79. if m != nil {
  80. return m.Name
  81. }
  82. return ""
  83. }
  84. func (m *PluginInfo) GetEndpoint() string {
  85. if m != nil {
  86. return m.Endpoint
  87. }
  88. return ""
  89. }
  90. func (m *PluginInfo) GetSupportedVersions() []string {
  91. if m != nil {
  92. return m.SupportedVersions
  93. }
  94. return nil
  95. }
  96. // RegistrationStatus is the message sent from Kubelet pluginwatcher to the plugin for notification on registration status
  97. type RegistrationStatus struct {
  98. // True if plugin gets registered successfully at Kubelet
  99. PluginRegistered bool `protobuf:"varint,1,opt,name=plugin_registered,json=pluginRegistered,proto3" json:"plugin_registered,omitempty"`
  100. // Error message in case plugin fails to register, empty string otherwise
  101. Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
  102. }
  103. func (m *RegistrationStatus) Reset() { *m = RegistrationStatus{} }
  104. func (*RegistrationStatus) ProtoMessage() {}
  105. func (*RegistrationStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
  106. func (m *RegistrationStatus) GetPluginRegistered() bool {
  107. if m != nil {
  108. return m.PluginRegistered
  109. }
  110. return false
  111. }
  112. func (m *RegistrationStatus) GetError() string {
  113. if m != nil {
  114. return m.Error
  115. }
  116. return ""
  117. }
  118. // RegistrationStatusResponse is sent by plugin to kubelet in response to RegistrationStatus RPC
  119. type RegistrationStatusResponse struct {
  120. }
  121. func (m *RegistrationStatusResponse) Reset() { *m = RegistrationStatusResponse{} }
  122. func (*RegistrationStatusResponse) ProtoMessage() {}
  123. func (*RegistrationStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
  124. // InfoRequest is the empty request message from Kubelet
  125. type InfoRequest struct {
  126. }
  127. func (m *InfoRequest) Reset() { *m = InfoRequest{} }
  128. func (*InfoRequest) ProtoMessage() {}
  129. func (*InfoRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} }
  130. func init() {
  131. proto.RegisterType((*PluginInfo)(nil), "pluginregistration.PluginInfo")
  132. proto.RegisterType((*RegistrationStatus)(nil), "pluginregistration.RegistrationStatus")
  133. proto.RegisterType((*RegistrationStatusResponse)(nil), "pluginregistration.RegistrationStatusResponse")
  134. proto.RegisterType((*InfoRequest)(nil), "pluginregistration.InfoRequest")
  135. }
  136. // Reference imports to suppress errors if they are not otherwise used.
  137. var _ context.Context
  138. var _ grpc.ClientConn
  139. // This is a compile-time assertion to ensure that this generated file
  140. // is compatible with the grpc package it is being compiled against.
  141. const _ = grpc.SupportPackageIsVersion4
  142. // Client API for Registration service
  143. type RegistrationClient interface {
  144. GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error)
  145. NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error)
  146. }
  147. type registrationClient struct {
  148. cc *grpc.ClientConn
  149. }
  150. func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient {
  151. return &registrationClient{cc}
  152. }
  153. func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) {
  154. out := new(PluginInfo)
  155. err := grpc.Invoke(ctx, "/pluginregistration.Registration/GetInfo", in, out, c.cc, opts...)
  156. if err != nil {
  157. return nil, err
  158. }
  159. return out, nil
  160. }
  161. func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) {
  162. out := new(RegistrationStatusResponse)
  163. err := grpc.Invoke(ctx, "/pluginregistration.Registration/NotifyRegistrationStatus", in, out, c.cc, opts...)
  164. if err != nil {
  165. return nil, err
  166. }
  167. return out, nil
  168. }
  169. // Server API for Registration service
  170. type RegistrationServer interface {
  171. GetInfo(context.Context, *InfoRequest) (*PluginInfo, error)
  172. NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error)
  173. }
  174. func RegisterRegistrationServer(s *grpc.Server, srv RegistrationServer) {
  175. s.RegisterService(&_Registration_serviceDesc, srv)
  176. }
  177. func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  178. in := new(InfoRequest)
  179. if err := dec(in); err != nil {
  180. return nil, err
  181. }
  182. if interceptor == nil {
  183. return srv.(RegistrationServer).GetInfo(ctx, in)
  184. }
  185. info := &grpc.UnaryServerInfo{
  186. Server: srv,
  187. FullMethod: "/pluginregistration.Registration/GetInfo",
  188. }
  189. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  190. return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest))
  191. }
  192. return interceptor(ctx, in, info, handler)
  193. }
  194. func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  195. in := new(RegistrationStatus)
  196. if err := dec(in); err != nil {
  197. return nil, err
  198. }
  199. if interceptor == nil {
  200. return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in)
  201. }
  202. info := &grpc.UnaryServerInfo{
  203. Server: srv,
  204. FullMethod: "/pluginregistration.Registration/NotifyRegistrationStatus",
  205. }
  206. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  207. return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus))
  208. }
  209. return interceptor(ctx, in, info, handler)
  210. }
  211. var _Registration_serviceDesc = grpc.ServiceDesc{
  212. ServiceName: "pluginregistration.Registration",
  213. HandlerType: (*RegistrationServer)(nil),
  214. Methods: []grpc.MethodDesc{
  215. {
  216. MethodName: "GetInfo",
  217. Handler: _Registration_GetInfo_Handler,
  218. },
  219. {
  220. MethodName: "NotifyRegistrationStatus",
  221. Handler: _Registration_NotifyRegistrationStatus_Handler,
  222. },
  223. },
  224. Streams: []grpc.StreamDesc{},
  225. Metadata: "api.proto",
  226. }
  227. func (m *PluginInfo) Marshal() (dAtA []byte, err error) {
  228. size := m.Size()
  229. dAtA = make([]byte, size)
  230. n, err := m.MarshalTo(dAtA)
  231. if err != nil {
  232. return nil, err
  233. }
  234. return dAtA[:n], nil
  235. }
  236. func (m *PluginInfo) MarshalTo(dAtA []byte) (int, error) {
  237. var i int
  238. _ = i
  239. var l int
  240. _ = l
  241. if len(m.Type) > 0 {
  242. dAtA[i] = 0xa
  243. i++
  244. i = encodeVarintApi(dAtA, i, uint64(len(m.Type)))
  245. i += copy(dAtA[i:], m.Type)
  246. }
  247. if len(m.Name) > 0 {
  248. dAtA[i] = 0x12
  249. i++
  250. i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
  251. i += copy(dAtA[i:], m.Name)
  252. }
  253. if len(m.Endpoint) > 0 {
  254. dAtA[i] = 0x1a
  255. i++
  256. i = encodeVarintApi(dAtA, i, uint64(len(m.Endpoint)))
  257. i += copy(dAtA[i:], m.Endpoint)
  258. }
  259. if len(m.SupportedVersions) > 0 {
  260. for _, s := range m.SupportedVersions {
  261. dAtA[i] = 0x22
  262. i++
  263. l = len(s)
  264. for l >= 1<<7 {
  265. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  266. l >>= 7
  267. i++
  268. }
  269. dAtA[i] = uint8(l)
  270. i++
  271. i += copy(dAtA[i:], s)
  272. }
  273. }
  274. return i, nil
  275. }
  276. func (m *RegistrationStatus) Marshal() (dAtA []byte, err error) {
  277. size := m.Size()
  278. dAtA = make([]byte, size)
  279. n, err := m.MarshalTo(dAtA)
  280. if err != nil {
  281. return nil, err
  282. }
  283. return dAtA[:n], nil
  284. }
  285. func (m *RegistrationStatus) MarshalTo(dAtA []byte) (int, error) {
  286. var i int
  287. _ = i
  288. var l int
  289. _ = l
  290. if m.PluginRegistered {
  291. dAtA[i] = 0x8
  292. i++
  293. if m.PluginRegistered {
  294. dAtA[i] = 1
  295. } else {
  296. dAtA[i] = 0
  297. }
  298. i++
  299. }
  300. if len(m.Error) > 0 {
  301. dAtA[i] = 0x12
  302. i++
  303. i = encodeVarintApi(dAtA, i, uint64(len(m.Error)))
  304. i += copy(dAtA[i:], m.Error)
  305. }
  306. return i, nil
  307. }
  308. func (m *RegistrationStatusResponse) Marshal() (dAtA []byte, err error) {
  309. size := m.Size()
  310. dAtA = make([]byte, size)
  311. n, err := m.MarshalTo(dAtA)
  312. if err != nil {
  313. return nil, err
  314. }
  315. return dAtA[:n], nil
  316. }
  317. func (m *RegistrationStatusResponse) MarshalTo(dAtA []byte) (int, error) {
  318. var i int
  319. _ = i
  320. var l int
  321. _ = l
  322. return i, nil
  323. }
  324. func (m *InfoRequest) Marshal() (dAtA []byte, err error) {
  325. size := m.Size()
  326. dAtA = make([]byte, size)
  327. n, err := m.MarshalTo(dAtA)
  328. if err != nil {
  329. return nil, err
  330. }
  331. return dAtA[:n], nil
  332. }
  333. func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) {
  334. var i int
  335. _ = i
  336. var l int
  337. _ = l
  338. return i, nil
  339. }
  340. func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
  341. for v >= 1<<7 {
  342. dAtA[offset] = uint8(v&0x7f | 0x80)
  343. v >>= 7
  344. offset++
  345. }
  346. dAtA[offset] = uint8(v)
  347. return offset + 1
  348. }
  349. func (m *PluginInfo) Size() (n int) {
  350. var l int
  351. _ = l
  352. l = len(m.Type)
  353. if l > 0 {
  354. n += 1 + l + sovApi(uint64(l))
  355. }
  356. l = len(m.Name)
  357. if l > 0 {
  358. n += 1 + l + sovApi(uint64(l))
  359. }
  360. l = len(m.Endpoint)
  361. if l > 0 {
  362. n += 1 + l + sovApi(uint64(l))
  363. }
  364. if len(m.SupportedVersions) > 0 {
  365. for _, s := range m.SupportedVersions {
  366. l = len(s)
  367. n += 1 + l + sovApi(uint64(l))
  368. }
  369. }
  370. return n
  371. }
  372. func (m *RegistrationStatus) Size() (n int) {
  373. var l int
  374. _ = l
  375. if m.PluginRegistered {
  376. n += 2
  377. }
  378. l = len(m.Error)
  379. if l > 0 {
  380. n += 1 + l + sovApi(uint64(l))
  381. }
  382. return n
  383. }
  384. func (m *RegistrationStatusResponse) Size() (n int) {
  385. var l int
  386. _ = l
  387. return n
  388. }
  389. func (m *InfoRequest) Size() (n int) {
  390. var l int
  391. _ = l
  392. return n
  393. }
  394. func sovApi(x uint64) (n int) {
  395. for {
  396. n++
  397. x >>= 7
  398. if x == 0 {
  399. break
  400. }
  401. }
  402. return n
  403. }
  404. func sozApi(x uint64) (n int) {
  405. return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  406. }
  407. func (this *PluginInfo) String() string {
  408. if this == nil {
  409. return "nil"
  410. }
  411. s := strings.Join([]string{`&PluginInfo{`,
  412. `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
  413. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  414. `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`,
  415. `SupportedVersions:` + fmt.Sprintf("%v", this.SupportedVersions) + `,`,
  416. `}`,
  417. }, "")
  418. return s
  419. }
  420. func (this *RegistrationStatus) String() string {
  421. if this == nil {
  422. return "nil"
  423. }
  424. s := strings.Join([]string{`&RegistrationStatus{`,
  425. `PluginRegistered:` + fmt.Sprintf("%v", this.PluginRegistered) + `,`,
  426. `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
  427. `}`,
  428. }, "")
  429. return s
  430. }
  431. func (this *RegistrationStatusResponse) String() string {
  432. if this == nil {
  433. return "nil"
  434. }
  435. s := strings.Join([]string{`&RegistrationStatusResponse{`,
  436. `}`,
  437. }, "")
  438. return s
  439. }
  440. func (this *InfoRequest) String() string {
  441. if this == nil {
  442. return "nil"
  443. }
  444. s := strings.Join([]string{`&InfoRequest{`,
  445. `}`,
  446. }, "")
  447. return s
  448. }
  449. func valueToStringApi(v interface{}) string {
  450. rv := reflect.ValueOf(v)
  451. if rv.IsNil() {
  452. return "nil"
  453. }
  454. pv := reflect.Indirect(rv).Interface()
  455. return fmt.Sprintf("*%v", pv)
  456. }
  457. func (m *PluginInfo) Unmarshal(dAtA []byte) error {
  458. l := len(dAtA)
  459. iNdEx := 0
  460. for iNdEx < l {
  461. preIndex := iNdEx
  462. var wire uint64
  463. for shift := uint(0); ; shift += 7 {
  464. if shift >= 64 {
  465. return ErrIntOverflowApi
  466. }
  467. if iNdEx >= l {
  468. return io.ErrUnexpectedEOF
  469. }
  470. b := dAtA[iNdEx]
  471. iNdEx++
  472. wire |= (uint64(b) & 0x7F) << shift
  473. if b < 0x80 {
  474. break
  475. }
  476. }
  477. fieldNum := int32(wire >> 3)
  478. wireType := int(wire & 0x7)
  479. if wireType == 4 {
  480. return fmt.Errorf("proto: PluginInfo: wiretype end group for non-group")
  481. }
  482. if fieldNum <= 0 {
  483. return fmt.Errorf("proto: PluginInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  484. }
  485. switch fieldNum {
  486. case 1:
  487. if wireType != 2 {
  488. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  489. }
  490. var stringLen uint64
  491. for shift := uint(0); ; shift += 7 {
  492. if shift >= 64 {
  493. return ErrIntOverflowApi
  494. }
  495. if iNdEx >= l {
  496. return io.ErrUnexpectedEOF
  497. }
  498. b := dAtA[iNdEx]
  499. iNdEx++
  500. stringLen |= (uint64(b) & 0x7F) << shift
  501. if b < 0x80 {
  502. break
  503. }
  504. }
  505. intStringLen := int(stringLen)
  506. if intStringLen < 0 {
  507. return ErrInvalidLengthApi
  508. }
  509. postIndex := iNdEx + intStringLen
  510. if postIndex > l {
  511. return io.ErrUnexpectedEOF
  512. }
  513. m.Type = string(dAtA[iNdEx:postIndex])
  514. iNdEx = postIndex
  515. case 2:
  516. if wireType != 2 {
  517. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  518. }
  519. var stringLen uint64
  520. for shift := uint(0); ; shift += 7 {
  521. if shift >= 64 {
  522. return ErrIntOverflowApi
  523. }
  524. if iNdEx >= l {
  525. return io.ErrUnexpectedEOF
  526. }
  527. b := dAtA[iNdEx]
  528. iNdEx++
  529. stringLen |= (uint64(b) & 0x7F) << shift
  530. if b < 0x80 {
  531. break
  532. }
  533. }
  534. intStringLen := int(stringLen)
  535. if intStringLen < 0 {
  536. return ErrInvalidLengthApi
  537. }
  538. postIndex := iNdEx + intStringLen
  539. if postIndex > l {
  540. return io.ErrUnexpectedEOF
  541. }
  542. m.Name = string(dAtA[iNdEx:postIndex])
  543. iNdEx = postIndex
  544. case 3:
  545. if wireType != 2 {
  546. return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
  547. }
  548. var stringLen uint64
  549. for shift := uint(0); ; shift += 7 {
  550. if shift >= 64 {
  551. return ErrIntOverflowApi
  552. }
  553. if iNdEx >= l {
  554. return io.ErrUnexpectedEOF
  555. }
  556. b := dAtA[iNdEx]
  557. iNdEx++
  558. stringLen |= (uint64(b) & 0x7F) << shift
  559. if b < 0x80 {
  560. break
  561. }
  562. }
  563. intStringLen := int(stringLen)
  564. if intStringLen < 0 {
  565. return ErrInvalidLengthApi
  566. }
  567. postIndex := iNdEx + intStringLen
  568. if postIndex > l {
  569. return io.ErrUnexpectedEOF
  570. }
  571. m.Endpoint = string(dAtA[iNdEx:postIndex])
  572. iNdEx = postIndex
  573. case 4:
  574. if wireType != 2 {
  575. return fmt.Errorf("proto: wrong wireType = %d for field SupportedVersions", wireType)
  576. }
  577. var stringLen uint64
  578. for shift := uint(0); ; shift += 7 {
  579. if shift >= 64 {
  580. return ErrIntOverflowApi
  581. }
  582. if iNdEx >= l {
  583. return io.ErrUnexpectedEOF
  584. }
  585. b := dAtA[iNdEx]
  586. iNdEx++
  587. stringLen |= (uint64(b) & 0x7F) << shift
  588. if b < 0x80 {
  589. break
  590. }
  591. }
  592. intStringLen := int(stringLen)
  593. if intStringLen < 0 {
  594. return ErrInvalidLengthApi
  595. }
  596. postIndex := iNdEx + intStringLen
  597. if postIndex > l {
  598. return io.ErrUnexpectedEOF
  599. }
  600. m.SupportedVersions = append(m.SupportedVersions, string(dAtA[iNdEx:postIndex]))
  601. iNdEx = postIndex
  602. default:
  603. iNdEx = preIndex
  604. skippy, err := skipApi(dAtA[iNdEx:])
  605. if err != nil {
  606. return err
  607. }
  608. if skippy < 0 {
  609. return ErrInvalidLengthApi
  610. }
  611. if (iNdEx + skippy) > l {
  612. return io.ErrUnexpectedEOF
  613. }
  614. iNdEx += skippy
  615. }
  616. }
  617. if iNdEx > l {
  618. return io.ErrUnexpectedEOF
  619. }
  620. return nil
  621. }
  622. func (m *RegistrationStatus) Unmarshal(dAtA []byte) error {
  623. l := len(dAtA)
  624. iNdEx := 0
  625. for iNdEx < l {
  626. preIndex := iNdEx
  627. var wire uint64
  628. for shift := uint(0); ; shift += 7 {
  629. if shift >= 64 {
  630. return ErrIntOverflowApi
  631. }
  632. if iNdEx >= l {
  633. return io.ErrUnexpectedEOF
  634. }
  635. b := dAtA[iNdEx]
  636. iNdEx++
  637. wire |= (uint64(b) & 0x7F) << shift
  638. if b < 0x80 {
  639. break
  640. }
  641. }
  642. fieldNum := int32(wire >> 3)
  643. wireType := int(wire & 0x7)
  644. if wireType == 4 {
  645. return fmt.Errorf("proto: RegistrationStatus: wiretype end group for non-group")
  646. }
  647. if fieldNum <= 0 {
  648. return fmt.Errorf("proto: RegistrationStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  649. }
  650. switch fieldNum {
  651. case 1:
  652. if wireType != 0 {
  653. return fmt.Errorf("proto: wrong wireType = %d for field PluginRegistered", wireType)
  654. }
  655. var v int
  656. for shift := uint(0); ; shift += 7 {
  657. if shift >= 64 {
  658. return ErrIntOverflowApi
  659. }
  660. if iNdEx >= l {
  661. return io.ErrUnexpectedEOF
  662. }
  663. b := dAtA[iNdEx]
  664. iNdEx++
  665. v |= (int(b) & 0x7F) << shift
  666. if b < 0x80 {
  667. break
  668. }
  669. }
  670. m.PluginRegistered = bool(v != 0)
  671. case 2:
  672. if wireType != 2 {
  673. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  674. }
  675. var stringLen uint64
  676. for shift := uint(0); ; shift += 7 {
  677. if shift >= 64 {
  678. return ErrIntOverflowApi
  679. }
  680. if iNdEx >= l {
  681. return io.ErrUnexpectedEOF
  682. }
  683. b := dAtA[iNdEx]
  684. iNdEx++
  685. stringLen |= (uint64(b) & 0x7F) << shift
  686. if b < 0x80 {
  687. break
  688. }
  689. }
  690. intStringLen := int(stringLen)
  691. if intStringLen < 0 {
  692. return ErrInvalidLengthApi
  693. }
  694. postIndex := iNdEx + intStringLen
  695. if postIndex > l {
  696. return io.ErrUnexpectedEOF
  697. }
  698. m.Error = string(dAtA[iNdEx:postIndex])
  699. iNdEx = postIndex
  700. default:
  701. iNdEx = preIndex
  702. skippy, err := skipApi(dAtA[iNdEx:])
  703. if err != nil {
  704. return err
  705. }
  706. if skippy < 0 {
  707. return ErrInvalidLengthApi
  708. }
  709. if (iNdEx + skippy) > l {
  710. return io.ErrUnexpectedEOF
  711. }
  712. iNdEx += skippy
  713. }
  714. }
  715. if iNdEx > l {
  716. return io.ErrUnexpectedEOF
  717. }
  718. return nil
  719. }
  720. func (m *RegistrationStatusResponse) Unmarshal(dAtA []byte) error {
  721. l := len(dAtA)
  722. iNdEx := 0
  723. for iNdEx < l {
  724. preIndex := iNdEx
  725. var wire uint64
  726. for shift := uint(0); ; shift += 7 {
  727. if shift >= 64 {
  728. return ErrIntOverflowApi
  729. }
  730. if iNdEx >= l {
  731. return io.ErrUnexpectedEOF
  732. }
  733. b := dAtA[iNdEx]
  734. iNdEx++
  735. wire |= (uint64(b) & 0x7F) << shift
  736. if b < 0x80 {
  737. break
  738. }
  739. }
  740. fieldNum := int32(wire >> 3)
  741. wireType := int(wire & 0x7)
  742. if wireType == 4 {
  743. return fmt.Errorf("proto: RegistrationStatusResponse: wiretype end group for non-group")
  744. }
  745. if fieldNum <= 0 {
  746. return fmt.Errorf("proto: RegistrationStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  747. }
  748. switch fieldNum {
  749. default:
  750. iNdEx = preIndex
  751. skippy, err := skipApi(dAtA[iNdEx:])
  752. if err != nil {
  753. return err
  754. }
  755. if skippy < 0 {
  756. return ErrInvalidLengthApi
  757. }
  758. if (iNdEx + skippy) > l {
  759. return io.ErrUnexpectedEOF
  760. }
  761. iNdEx += skippy
  762. }
  763. }
  764. if iNdEx > l {
  765. return io.ErrUnexpectedEOF
  766. }
  767. return nil
  768. }
  769. func (m *InfoRequest) Unmarshal(dAtA []byte) error {
  770. l := len(dAtA)
  771. iNdEx := 0
  772. for iNdEx < l {
  773. preIndex := iNdEx
  774. var wire uint64
  775. for shift := uint(0); ; shift += 7 {
  776. if shift >= 64 {
  777. return ErrIntOverflowApi
  778. }
  779. if iNdEx >= l {
  780. return io.ErrUnexpectedEOF
  781. }
  782. b := dAtA[iNdEx]
  783. iNdEx++
  784. wire |= (uint64(b) & 0x7F) << shift
  785. if b < 0x80 {
  786. break
  787. }
  788. }
  789. fieldNum := int32(wire >> 3)
  790. wireType := int(wire & 0x7)
  791. if wireType == 4 {
  792. return fmt.Errorf("proto: InfoRequest: wiretype end group for non-group")
  793. }
  794. if fieldNum <= 0 {
  795. return fmt.Errorf("proto: InfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  796. }
  797. switch fieldNum {
  798. default:
  799. iNdEx = preIndex
  800. skippy, err := skipApi(dAtA[iNdEx:])
  801. if err != nil {
  802. return err
  803. }
  804. if skippy < 0 {
  805. return ErrInvalidLengthApi
  806. }
  807. if (iNdEx + skippy) > l {
  808. return io.ErrUnexpectedEOF
  809. }
  810. iNdEx += skippy
  811. }
  812. }
  813. if iNdEx > l {
  814. return io.ErrUnexpectedEOF
  815. }
  816. return nil
  817. }
  818. func skipApi(dAtA []byte) (n int, err error) {
  819. l := len(dAtA)
  820. iNdEx := 0
  821. for iNdEx < l {
  822. var wire uint64
  823. for shift := uint(0); ; shift += 7 {
  824. if shift >= 64 {
  825. return 0, ErrIntOverflowApi
  826. }
  827. if iNdEx >= l {
  828. return 0, io.ErrUnexpectedEOF
  829. }
  830. b := dAtA[iNdEx]
  831. iNdEx++
  832. wire |= (uint64(b) & 0x7F) << shift
  833. if b < 0x80 {
  834. break
  835. }
  836. }
  837. wireType := int(wire & 0x7)
  838. switch wireType {
  839. case 0:
  840. for shift := uint(0); ; shift += 7 {
  841. if shift >= 64 {
  842. return 0, ErrIntOverflowApi
  843. }
  844. if iNdEx >= l {
  845. return 0, io.ErrUnexpectedEOF
  846. }
  847. iNdEx++
  848. if dAtA[iNdEx-1] < 0x80 {
  849. break
  850. }
  851. }
  852. return iNdEx, nil
  853. case 1:
  854. iNdEx += 8
  855. return iNdEx, nil
  856. case 2:
  857. var length int
  858. for shift := uint(0); ; shift += 7 {
  859. if shift >= 64 {
  860. return 0, ErrIntOverflowApi
  861. }
  862. if iNdEx >= l {
  863. return 0, io.ErrUnexpectedEOF
  864. }
  865. b := dAtA[iNdEx]
  866. iNdEx++
  867. length |= (int(b) & 0x7F) << shift
  868. if b < 0x80 {
  869. break
  870. }
  871. }
  872. iNdEx += length
  873. if length < 0 {
  874. return 0, ErrInvalidLengthApi
  875. }
  876. return iNdEx, nil
  877. case 3:
  878. for {
  879. var innerWire uint64
  880. var start int = iNdEx
  881. for shift := uint(0); ; shift += 7 {
  882. if shift >= 64 {
  883. return 0, ErrIntOverflowApi
  884. }
  885. if iNdEx >= l {
  886. return 0, io.ErrUnexpectedEOF
  887. }
  888. b := dAtA[iNdEx]
  889. iNdEx++
  890. innerWire |= (uint64(b) & 0x7F) << shift
  891. if b < 0x80 {
  892. break
  893. }
  894. }
  895. innerWireType := int(innerWire & 0x7)
  896. if innerWireType == 4 {
  897. break
  898. }
  899. next, err := skipApi(dAtA[start:])
  900. if err != nil {
  901. return 0, err
  902. }
  903. iNdEx = start + next
  904. }
  905. return iNdEx, nil
  906. case 4:
  907. return iNdEx, nil
  908. case 5:
  909. iNdEx += 4
  910. return iNdEx, nil
  911. default:
  912. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  913. }
  914. }
  915. panic("unreachable")
  916. }
  917. var (
  918. ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
  919. ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
  920. )
  921. func init() { proto.RegisterFile("api.proto", fileDescriptorApi) }
  922. var fileDescriptorApi = []byte{
  923. // 337 bytes of a gzipped FileDescriptorProto
  924. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x41, 0x4b, 0x33, 0x31,
  925. 0x14, 0xdc, 0x7c, 0xed, 0xa7, 0xed, 0x53, 0xc1, 0x06, 0x0f, 0xcb, 0x52, 0x62, 0xd9, 0x83, 0x14,
  926. 0xa4, 0x5b, 0xd0, 0x7f, 0xe0, 0x45, 0x04, 0x11, 0x89, 0xa0, 0xc7, 0xb2, 0xb5, 0xaf, 0x6b, 0xc0,
  927. 0x26, 0x31, 0xc9, 0x0a, 0x3d, 0xe9, 0x4f, 0xf0, 0x67, 0xf5, 0x28, 0x9e, 0x3c, 0xda, 0xf5, 0x8f,
  928. 0x48, 0xb3, 0x65, 0x2d, 0xb4, 0x07, 0x6f, 0x6f, 0xe6, 0x4d, 0x1e, 0x33, 0x43, 0xa0, 0x99, 0x6a,
  929. 0x91, 0x68, 0xa3, 0x9c, 0xa2, 0x54, 0x3f, 0xe6, 0x99, 0x90, 0x06, 0x33, 0x61, 0x9d, 0x49, 0x9d,
  930. 0x50, 0x32, 0xea, 0x65, 0xc2, 0x3d, 0xe4, 0xc3, 0xe4, 0x5e, 0x4d, 0xfa, 0x99, 0xca, 0x54, 0xdf,
  931. 0x4b, 0x87, 0xf9, 0xd8, 0x23, 0x0f, 0xfc, 0x54, 0x9e, 0x88, 0x5f, 0x00, 0xae, 0xfd, 0x91, 0x0b,
  932. 0x39, 0x56, 0x94, 0x42, 0xdd, 0x4d, 0x35, 0x86, 0xa4, 0x43, 0xba, 0x4d, 0xee, 0xe7, 0x05, 0x27,
  933. 0xd3, 0x09, 0x86, 0xff, 0x4a, 0x6e, 0x31, 0xd3, 0x08, 0x1a, 0x28, 0x47, 0x5a, 0x09, 0xe9, 0xc2,
  934. 0x9a, 0xe7, 0x2b, 0x4c, 0x7b, 0x40, 0x6d, 0xae, 0xb5, 0x32, 0x0e, 0x47, 0x83, 0x67, 0x34, 0x56,
  935. 0x28, 0x69, 0xc3, 0x7a, 0xa7, 0xd6, 0x6d, 0xf2, 0x56, 0xb5, 0xb9, 0x5d, 0x2e, 0xe2, 0x3b, 0xa0,
  936. 0x7c, 0xc5, 0xff, 0x8d, 0x4b, 0x5d, 0x6e, 0xe9, 0x31, 0xb4, 0xca, 0x6c, 0x83, 0x32, 0x1c, 0x1a,
  937. 0x1c, 0x79, 0x57, 0x0d, 0xbe, 0x5f, 0x2e, 0x78, 0xc5, 0xd3, 0x03, 0xf8, 0x8f, 0xc6, 0x28, 0xb3,
  938. 0xb4, 0x58, 0x82, 0xb8, 0x0d, 0xd1, 0xfa, 0x61, 0x8e, 0x56, 0x2b, 0x69, 0x31, 0xde, 0x83, 0x9d,
  939. 0x45, 0x62, 0x8e, 0x4f, 0x39, 0x5a, 0x77, 0xf2, 0x41, 0x60, 0x77, 0x55, 0x4d, 0x2f, 0x61, 0xfb,
  940. 0x1c, 0x9d, 0x2f, 0xe5, 0x30, 0x59, 0xaf, 0x39, 0x59, 0x79, 0x1c, 0xb1, 0x4d, 0x82, 0xdf, 0x56,
  941. 0xe3, 0x80, 0x3a, 0x08, 0xaf, 0x94, 0x13, 0xe3, 0xe9, 0x86, 0xa8, 0x47, 0x9b, 0x5e, 0xaf, 0xeb,
  942. 0xa2, 0xe4, 0x6f, 0xba, 0x2a, 0x61, 0x70, 0xd6, 0x9e, 0xcd, 0x19, 0xf9, 0x9c, 0xb3, 0xe0, 0xb5,
  943. 0x60, 0x64, 0x56, 0x30, 0xf2, 0x5e, 0x30, 0xf2, 0x55, 0x30, 0xf2, 0xf6, 0xcd, 0x82, 0xe1, 0x96,
  944. 0xff, 0x00, 0xa7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe4, 0xc0, 0xe3, 0x42, 0x50, 0x02, 0x00,
  945. 0x00,
  946. }