Fix compatibility with latest master (20.01-rc0)
[govpp.git] / examples / binapi / memclnt / memclnt.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // source: /usr/share/vpp/api/core/memclnt.api.json
3
4 /*
5 Package memclnt is a generated VPP binary API for 'memclnt' module.
6
7 It consists of:
8           2 types
9          22 messages
10          13 services
11 */
12 package memclnt
13
14 import (
15         bytes "bytes"
16         context "context"
17         api "git.fd.io/govpp.git/api"
18         struc "github.com/lunixbochs/struc"
19         io "io"
20         strconv "strconv"
21 )
22
23 const (
24         // ModuleName is the name of this module.
25         ModuleName = "memclnt"
26         // APIVersion is the API version of this module.
27         APIVersion = "2.1.0"
28         // VersionCrc is the CRC of this module.
29         VersionCrc = 0x949f3cb1
30 )
31
32 // MessageTableEntry represents VPP binary API type 'message_table_entry'.
33 type MessageTableEntry struct {
34         Index uint16
35         Name  []byte `struc:"[64]byte"`
36 }
37
38 func (*MessageTableEntry) GetTypeName() string {
39         return "message_table_entry"
40 }
41
42 // ModuleVersion represents VPP binary API type 'module_version'.
43 type ModuleVersion struct {
44         Major uint32
45         Minor uint32
46         Patch uint32
47         Name  []byte `struc:"[64]byte"`
48 }
49
50 func (*ModuleVersion) GetTypeName() string {
51         return "module_version"
52 }
53
54 // APIVersions represents VPP binary API message 'api_versions'.
55 type APIVersions struct{}
56
57 func (*APIVersions) GetMessageName() string {
58         return "api_versions"
59 }
60 func (*APIVersions) GetCrcString() string {
61         return "51077d14"
62 }
63 func (*APIVersions) GetMessageType() api.MessageType {
64         return api.RequestMessage
65 }
66
67 // APIVersionsReply represents VPP binary API message 'api_versions_reply'.
68 type APIVersionsReply struct {
69         Retval      int32
70         Count       uint32 `struc:"sizeof=APIVersions"`
71         APIVersions []ModuleVersion
72 }
73
74 func (*APIVersionsReply) GetMessageName() string {
75         return "api_versions_reply"
76 }
77 func (*APIVersionsReply) GetCrcString() string {
78         return "76f45113"
79 }
80 func (*APIVersionsReply) GetMessageType() api.MessageType {
81         return api.ReplyMessage
82 }
83
84 // GetFirstMsgID represents VPP binary API message 'get_first_msg_id'.
85 type GetFirstMsgID struct {
86         Name []byte `struc:"[64]byte"`
87 }
88
89 func (*GetFirstMsgID) GetMessageName() string {
90         return "get_first_msg_id"
91 }
92 func (*GetFirstMsgID) GetCrcString() string {
93         return "0cb71b0e"
94 }
95 func (*GetFirstMsgID) GetMessageType() api.MessageType {
96         return api.RequestMessage
97 }
98
99 // GetFirstMsgIDReply represents VPP binary API message 'get_first_msg_id_reply'.
100 type GetFirstMsgIDReply struct {
101         Retval     int32
102         FirstMsgID uint16
103 }
104
105 func (*GetFirstMsgIDReply) GetMessageName() string {
106         return "get_first_msg_id_reply"
107 }
108 func (*GetFirstMsgIDReply) GetCrcString() string {
109         return "7d337472"
110 }
111 func (*GetFirstMsgIDReply) GetMessageType() api.MessageType {
112         return api.ReplyMessage
113 }
114
115 // MemclntCreate represents VPP binary API message 'memclnt_create'.
116 type MemclntCreate struct {
117         CtxQuota    int32
118         InputQueue  uint64
119         Name        []byte   `struc:"[64]byte"`
120         APIVersions []uint32 `struc:"[8]uint32"`
121 }
122
123 func (*MemclntCreate) GetMessageName() string {
124         return "memclnt_create"
125 }
126 func (*MemclntCreate) GetCrcString() string {
127         return "6d33c5ea"
128 }
129 func (*MemclntCreate) GetMessageType() api.MessageType {
130         return api.ReplyMessage
131 }
132
133 // MemclntCreateReply represents VPP binary API message 'memclnt_create_reply'.
134 type MemclntCreateReply struct {
135         Response     int32
136         Handle       uint64
137         Index        uint32
138         MessageTable uint64
139 }
140
141 func (*MemclntCreateReply) GetMessageName() string {
142         return "memclnt_create_reply"
143 }
144 func (*MemclntCreateReply) GetCrcString() string {
145         return "42ec4560"
146 }
147 func (*MemclntCreateReply) GetMessageType() api.MessageType {
148         return api.ReplyMessage
149 }
150
151 // MemclntDelete represents VPP binary API message 'memclnt_delete'.
152 type MemclntDelete struct {
153         Index     uint32
154         Handle    uint64
155         DoCleanup uint8
156 }
157
158 func (*MemclntDelete) GetMessageName() string {
159         return "memclnt_delete"
160 }
161 func (*MemclntDelete) GetCrcString() string {
162         return "4dd351e9"
163 }
164 func (*MemclntDelete) GetMessageType() api.MessageType {
165         return api.OtherMessage
166 }
167
168 // MemclntDeleteReply represents VPP binary API message 'memclnt_delete_reply'.
169 type MemclntDeleteReply struct {
170         Response int32
171         Handle   uint64
172 }
173
174 func (*MemclntDeleteReply) GetMessageName() string {
175         return "memclnt_delete_reply"
176 }
177 func (*MemclntDeleteReply) GetCrcString() string {
178         return "3d3b6312"
179 }
180 func (*MemclntDeleteReply) GetMessageType() api.MessageType {
181         return api.OtherMessage
182 }
183
184 // MemclntKeepalive represents VPP binary API message 'memclnt_keepalive'.
185 type MemclntKeepalive struct{}
186
187 func (*MemclntKeepalive) GetMessageName() string {
188         return "memclnt_keepalive"
189 }
190 func (*MemclntKeepalive) GetCrcString() string {
191         return "51077d14"
192 }
193 func (*MemclntKeepalive) GetMessageType() api.MessageType {
194         return api.RequestMessage
195 }
196
197 // MemclntKeepaliveReply represents VPP binary API message 'memclnt_keepalive_reply'.
198 type MemclntKeepaliveReply struct {
199         Retval int32
200 }
201
202 func (*MemclntKeepaliveReply) GetMessageName() string {
203         return "memclnt_keepalive_reply"
204 }
205 func (*MemclntKeepaliveReply) GetCrcString() string {
206         return "e8d4e804"
207 }
208 func (*MemclntKeepaliveReply) GetMessageType() api.MessageType {
209         return api.ReplyMessage
210 }
211
212 // MemclntReadTimeout represents VPP binary API message 'memclnt_read_timeout'.
213 type MemclntReadTimeout struct {
214         Dummy uint8
215 }
216
217 func (*MemclntReadTimeout) GetMessageName() string {
218         return "memclnt_read_timeout"
219 }
220 func (*MemclntReadTimeout) GetCrcString() string {
221         return "c3a3a452"
222 }
223 func (*MemclntReadTimeout) GetMessageType() api.MessageType {
224         return api.OtherMessage
225 }
226
227 // MemclntRxThreadSuspend represents VPP binary API message 'memclnt_rx_thread_suspend'.
228 type MemclntRxThreadSuspend struct {
229         Dummy uint8
230 }
231
232 func (*MemclntRxThreadSuspend) GetMessageName() string {
233         return "memclnt_rx_thread_suspend"
234 }
235 func (*MemclntRxThreadSuspend) GetCrcString() string {
236         return "c3a3a452"
237 }
238 func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType {
239         return api.OtherMessage
240 }
241
242 // RPCCall represents VPP binary API message 'rpc_call'.
243 type RPCCall struct {
244         Function        uint64
245         Multicast       uint8
246         NeedBarrierSync uint8
247         SendReply       uint8
248         DataLen         uint32 `struc:"sizeof=Data"`
249         Data            []byte
250 }
251
252 func (*RPCCall) GetMessageName() string {
253         return "rpc_call"
254 }
255 func (*RPCCall) GetCrcString() string {
256         return "7e8a2c95"
257 }
258 func (*RPCCall) GetMessageType() api.MessageType {
259         return api.RequestMessage
260 }
261
262 // RPCCallReply represents VPP binary API message 'rpc_call_reply'.
263 type RPCCallReply struct {
264         Retval int32
265 }
266
267 func (*RPCCallReply) GetMessageName() string {
268         return "rpc_call_reply"
269 }
270 func (*RPCCallReply) GetCrcString() string {
271         return "e8d4e804"
272 }
273 func (*RPCCallReply) GetMessageType() api.MessageType {
274         return api.ReplyMessage
275 }
276
277 // RxThreadExit represents VPP binary API message 'rx_thread_exit'.
278 type RxThreadExit struct {
279         Dummy uint8
280 }
281
282 func (*RxThreadExit) GetMessageName() string {
283         return "rx_thread_exit"
284 }
285 func (*RxThreadExit) GetCrcString() string {
286         return "c3a3a452"
287 }
288 func (*RxThreadExit) GetMessageType() api.MessageType {
289         return api.OtherMessage
290 }
291
292 // SockInitShm represents VPP binary API message 'sock_init_shm'.
293 type SockInitShm struct {
294         RequestedSize uint32
295         Nitems        uint8 `struc:"sizeof=Configs"`
296         Configs       []uint64
297 }
298
299 func (*SockInitShm) GetMessageName() string {
300         return "sock_init_shm"
301 }
302 func (*SockInitShm) GetCrcString() string {
303         return "51646d92"
304 }
305 func (*SockInitShm) GetMessageType() api.MessageType {
306         return api.RequestMessage
307 }
308
309 // SockInitShmReply represents VPP binary API message 'sock_init_shm_reply'.
310 type SockInitShmReply struct {
311         Retval int32
312 }
313
314 func (*SockInitShmReply) GetMessageName() string {
315         return "sock_init_shm_reply"
316 }
317 func (*SockInitShmReply) GetCrcString() string {
318         return "e8d4e804"
319 }
320 func (*SockInitShmReply) GetMessageType() api.MessageType {
321         return api.ReplyMessage
322 }
323
324 // SockclntCreate represents VPP binary API message 'sockclnt_create'.
325 type SockclntCreate struct {
326         Name []byte `struc:"[64]byte"`
327 }
328
329 func (*SockclntCreate) GetMessageName() string {
330         return "sockclnt_create"
331 }
332 func (*SockclntCreate) GetCrcString() string {
333         return "df2cf94d"
334 }
335 func (*SockclntCreate) GetMessageType() api.MessageType {
336         return api.ReplyMessage
337 }
338
339 // SockclntCreateReply represents VPP binary API message 'sockclnt_create_reply'.
340 type SockclntCreateReply struct {
341         Response     int32
342         Index        uint32
343         Count        uint16 `struc:"sizeof=MessageTable"`
344         MessageTable []MessageTableEntry
345 }
346
347 func (*SockclntCreateReply) GetMessageName() string {
348         return "sockclnt_create_reply"
349 }
350 func (*SockclntCreateReply) GetCrcString() string {
351         return "21795657"
352 }
353 func (*SockclntCreateReply) GetMessageType() api.MessageType {
354         return api.RequestMessage
355 }
356
357 // SockclntDelete represents VPP binary API message 'sockclnt_delete'.
358 type SockclntDelete struct {
359         Index uint32
360 }
361
362 func (*SockclntDelete) GetMessageName() string {
363         return "sockclnt_delete"
364 }
365 func (*SockclntDelete) GetCrcString() string {
366         return "8ac76db6"
367 }
368 func (*SockclntDelete) GetMessageType() api.MessageType {
369         return api.RequestMessage
370 }
371
372 // SockclntDeleteReply represents VPP binary API message 'sockclnt_delete_reply'.
373 type SockclntDeleteReply struct {
374         Response int32
375 }
376
377 func (*SockclntDeleteReply) GetMessageName() string {
378         return "sockclnt_delete_reply"
379 }
380 func (*SockclntDeleteReply) GetCrcString() string {
381         return "8f38b1ee"
382 }
383 func (*SockclntDeleteReply) GetMessageType() api.MessageType {
384         return api.ReplyMessage
385 }
386
387 // TracePluginMsgIds represents VPP binary API message 'trace_plugin_msg_ids'.
388 type TracePluginMsgIds struct {
389         PluginName []byte `struc:"[128]byte"`
390         FirstMsgID uint16
391         LastMsgID  uint16
392 }
393
394 func (*TracePluginMsgIds) GetMessageName() string {
395         return "trace_plugin_msg_ids"
396 }
397 func (*TracePluginMsgIds) GetCrcString() string {
398         return "64af79f9"
399 }
400 func (*TracePluginMsgIds) GetMessageType() api.MessageType {
401         return api.RequestMessage
402 }
403
404 func init() {
405         api.RegisterMessage((*APIVersions)(nil), "memclnt.APIVersions")
406         api.RegisterMessage((*APIVersionsReply)(nil), "memclnt.APIVersionsReply")
407         api.RegisterMessage((*GetFirstMsgID)(nil), "memclnt.GetFirstMsgID")
408         api.RegisterMessage((*GetFirstMsgIDReply)(nil), "memclnt.GetFirstMsgIDReply")
409         api.RegisterMessage((*MemclntCreate)(nil), "memclnt.MemclntCreate")
410         api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt.MemclntCreateReply")
411         api.RegisterMessage((*MemclntDelete)(nil), "memclnt.MemclntDelete")
412         api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt.MemclntDeleteReply")
413         api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt.MemclntKeepalive")
414         api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt.MemclntKeepaliveReply")
415         api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt.MemclntReadTimeout")
416         api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt.MemclntRxThreadSuspend")
417         api.RegisterMessage((*RPCCall)(nil), "memclnt.RPCCall")
418         api.RegisterMessage((*RPCCallReply)(nil), "memclnt.RPCCallReply")
419         api.RegisterMessage((*RxThreadExit)(nil), "memclnt.RxThreadExit")
420         api.RegisterMessage((*SockInitShm)(nil), "memclnt.SockInitShm")
421         api.RegisterMessage((*SockInitShmReply)(nil), "memclnt.SockInitShmReply")
422         api.RegisterMessage((*SockclntCreate)(nil), "memclnt.SockclntCreate")
423         api.RegisterMessage((*SockclntCreateReply)(nil), "memclnt.SockclntCreateReply")
424         api.RegisterMessage((*SockclntDelete)(nil), "memclnt.SockclntDelete")
425         api.RegisterMessage((*SockclntDeleteReply)(nil), "memclnt.SockclntDeleteReply")
426         api.RegisterMessage((*TracePluginMsgIds)(nil), "memclnt.TracePluginMsgIds")
427 }
428
429 // Messages returns list of all messages in this module.
430 func AllMessages() []api.Message {
431         return []api.Message{
432                 (*APIVersions)(nil),
433                 (*APIVersionsReply)(nil),
434                 (*GetFirstMsgID)(nil),
435                 (*GetFirstMsgIDReply)(nil),
436                 (*MemclntCreate)(nil),
437                 (*MemclntCreateReply)(nil),
438                 (*MemclntDelete)(nil),
439                 (*MemclntDeleteReply)(nil),
440                 (*MemclntKeepalive)(nil),
441                 (*MemclntKeepaliveReply)(nil),
442                 (*MemclntReadTimeout)(nil),
443                 (*MemclntRxThreadSuspend)(nil),
444                 (*RPCCall)(nil),
445                 (*RPCCallReply)(nil),
446                 (*RxThreadExit)(nil),
447                 (*SockInitShm)(nil),
448                 (*SockInitShmReply)(nil),
449                 (*SockclntCreate)(nil),
450                 (*SockclntCreateReply)(nil),
451                 (*SockclntDelete)(nil),
452                 (*SockclntDeleteReply)(nil),
453                 (*TracePluginMsgIds)(nil),
454         }
455 }
456
457 // RPCService represents RPC service API for memclnt module.
458 type RPCService interface {
459         APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error)
460         GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error)
461         MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error)
462         MemclntDelete(ctx context.Context, in *MemclntDelete) (*MemclntDeleteReply, error)
463         MemclntKeepalive(ctx context.Context, in *MemclntKeepalive) (*MemclntKeepaliveReply, error)
464         MemclntReadTimeout(ctx context.Context, in *MemclntReadTimeout) error
465         MemclntRxThreadSuspend(ctx context.Context, in *MemclntRxThreadSuspend) error
466         RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply, error)
467         RxThreadExit(ctx context.Context, in *RxThreadExit) error
468         SockInitShm(ctx context.Context, in *SockInitShm) (*SockInitShmReply, error)
469         SockclntCreate(ctx context.Context, in *SockclntCreate) (*SockclntCreateReply, error)
470         SockclntDelete(ctx context.Context, in *SockclntDelete) (*SockclntDeleteReply, error)
471         TracePluginMsgIds(ctx context.Context, in *TracePluginMsgIds) error
472 }
473
474 type serviceClient struct {
475         ch api.Channel
476 }
477
478 func NewServiceClient(ch api.Channel) RPCService {
479         return &serviceClient{ch}
480 }
481
482 func (c *serviceClient) APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error) {
483         out := new(APIVersionsReply)
484         err := c.ch.SendRequest(in).ReceiveReply(out)
485         if err != nil {
486                 return nil, err
487         }
488         return out, nil
489 }
490
491 func (c *serviceClient) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error) {
492         out := new(GetFirstMsgIDReply)
493         err := c.ch.SendRequest(in).ReceiveReply(out)
494         if err != nil {
495                 return nil, err
496         }
497         return out, nil
498 }
499
500 func (c *serviceClient) MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error) {
501         out := new(MemclntCreateReply)
502         err := c.ch.SendRequest(in).ReceiveReply(out)
503         if err != nil {
504                 return nil, err
505         }
506         return out, nil
507 }
508
509 func (c *serviceClient) MemclntDelete(ctx context.Context, in *MemclntDelete) (*MemclntDeleteReply, error) {
510         out := new(MemclntDeleteReply)
511         err := c.ch.SendRequest(in).ReceiveReply(out)
512         if err != nil {
513                 return nil, err
514         }
515         return out, nil
516 }
517
518 func (c *serviceClient) MemclntKeepalive(ctx context.Context, in *MemclntKeepalive) (*MemclntKeepaliveReply, error) {
519         out := new(MemclntKeepaliveReply)
520         err := c.ch.SendRequest(in).ReceiveReply(out)
521         if err != nil {
522                 return nil, err
523         }
524         return out, nil
525 }
526
527 func (c *serviceClient) MemclntReadTimeout(ctx context.Context, in *MemclntReadTimeout) error {
528         c.ch.SendRequest(in)
529         return nil
530 }
531
532 func (c *serviceClient) MemclntRxThreadSuspend(ctx context.Context, in *MemclntRxThreadSuspend) error {
533         c.ch.SendRequest(in)
534         return nil
535 }
536
537 func (c *serviceClient) RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply, error) {
538         out := new(RPCCallReply)
539         err := c.ch.SendRequest(in).ReceiveReply(out)
540         if err != nil {
541                 return nil, err
542         }
543         return out, nil
544 }
545
546 func (c *serviceClient) RxThreadExit(ctx context.Context, in *RxThreadExit) error {
547         c.ch.SendRequest(in)
548         return nil
549 }
550
551 func (c *serviceClient) SockInitShm(ctx context.Context, in *SockInitShm) (*SockInitShmReply, error) {
552         out := new(SockInitShmReply)
553         err := c.ch.SendRequest(in).ReceiveReply(out)
554         if err != nil {
555                 return nil, err
556         }
557         return out, nil
558 }
559
560 func (c *serviceClient) SockclntCreate(ctx context.Context, in *SockclntCreate) (*SockclntCreateReply, error) {
561         out := new(SockclntCreateReply)
562         err := c.ch.SendRequest(in).ReceiveReply(out)
563         if err != nil {
564                 return nil, err
565         }
566         return out, nil
567 }
568
569 func (c *serviceClient) SockclntDelete(ctx context.Context, in *SockclntDelete) (*SockclntDeleteReply, error) {
570         out := new(SockclntDeleteReply)
571         err := c.ch.SendRequest(in).ReceiveReply(out)
572         if err != nil {
573                 return nil, err
574         }
575         return out, nil
576 }
577
578 func (c *serviceClient) TracePluginMsgIds(ctx context.Context, in *TracePluginMsgIds) error {
579         c.ch.SendRequest(in)
580         return nil
581 }
582
583 // This is a compile-time assertion to ensure that this generated file
584 // is compatible with the GoVPP api package it is being compiled against.
585 // A compilation error at this line likely means your copy of the
586 // GoVPP api package needs to be updated.
587 const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
588
589 // Reference imports to suppress errors if they are not otherwise used.
590 var _ = api.RegisterMessage
591 var _ = bytes.NewBuffer
592 var _ = context.Background
593 var _ = io.Copy
594 var _ = strconv.Itoa
595 var _ = struc.Pack