Refactored binapi generator with message encoding
[govpp.git] / examples / binapi / acl / acl_rpc.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2
3 package acl
4
5 import (
6         "context"
7         "io"
8
9         api "git.fd.io/govpp.git/api"
10 )
11
12 // RPCService represents RPC service API for acl module.
13 type RPCService interface {
14         DumpACL(ctx context.Context, in *ACLDump) (RPCService_DumpACLClient, error)
15         DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_DumpACLInterfaceEtypeWhitelistClient, error)
16         DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) (RPCService_DumpACLInterfaceListClient, error)
17         DumpMacipACL(ctx context.Context, in *MacipACLDump) (RPCService_DumpMacipACLClient, error)
18         DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_DumpMacipACLInterfaceListClient, error)
19         ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error)
20         ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error)
21         ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error)
22         ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error)
23         ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error)
24         ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error)
25         ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error)
26         ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error)
27         ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error)
28         MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error)
29         MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error)
30         MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error)
31         MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error)
32         MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error)
33 }
34
35 type serviceClient struct {
36         ch api.Channel
37 }
38
39 func NewServiceClient(ch api.Channel) RPCService {
40         return &serviceClient{ch}
41 }
42
43 func (c *serviceClient) DumpACL(ctx context.Context, in *ACLDump) (RPCService_DumpACLClient, error) {
44         stream := c.ch.SendMultiRequest(in)
45         x := &serviceClient_DumpACLClient{stream}
46         return x, nil
47 }
48
49 type RPCService_DumpACLClient interface {
50         Recv() (*ACLDetails, error)
51 }
52
53 type serviceClient_DumpACLClient struct {
54         api.MultiRequestCtx
55 }
56
57 func (c *serviceClient_DumpACLClient) Recv() (*ACLDetails, error) {
58         m := new(ACLDetails)
59         stop, err := c.MultiRequestCtx.ReceiveReply(m)
60         if err != nil {
61                 return nil, err
62         }
63         if stop {
64                 return nil, io.EOF
65         }
66         return m, nil
67 }
68
69 func (c *serviceClient) DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_DumpACLInterfaceEtypeWhitelistClient, error) {
70         stream := c.ch.SendMultiRequest(in)
71         x := &serviceClient_DumpACLInterfaceEtypeWhitelistClient{stream}
72         return x, nil
73 }
74
75 type RPCService_DumpACLInterfaceEtypeWhitelistClient interface {
76         Recv() (*ACLInterfaceEtypeWhitelistDetails, error)
77 }
78
79 type serviceClient_DumpACLInterfaceEtypeWhitelistClient struct {
80         api.MultiRequestCtx
81 }
82
83 func (c *serviceClient_DumpACLInterfaceEtypeWhitelistClient) Recv() (*ACLInterfaceEtypeWhitelistDetails, error) {
84         m := new(ACLInterfaceEtypeWhitelistDetails)
85         stop, err := c.MultiRequestCtx.ReceiveReply(m)
86         if err != nil {
87                 return nil, err
88         }
89         if stop {
90                 return nil, io.EOF
91         }
92         return m, nil
93 }
94
95 func (c *serviceClient) DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) (RPCService_DumpACLInterfaceListClient, error) {
96         stream := c.ch.SendMultiRequest(in)
97         x := &serviceClient_DumpACLInterfaceListClient{stream}
98         return x, nil
99 }
100
101 type RPCService_DumpACLInterfaceListClient interface {
102         Recv() (*ACLInterfaceListDetails, error)
103 }
104
105 type serviceClient_DumpACLInterfaceListClient struct {
106         api.MultiRequestCtx
107 }
108
109 func (c *serviceClient_DumpACLInterfaceListClient) Recv() (*ACLInterfaceListDetails, error) {
110         m := new(ACLInterfaceListDetails)
111         stop, err := c.MultiRequestCtx.ReceiveReply(m)
112         if err != nil {
113                 return nil, err
114         }
115         if stop {
116                 return nil, io.EOF
117         }
118         return m, nil
119 }
120
121 func (c *serviceClient) DumpMacipACL(ctx context.Context, in *MacipACLDump) (RPCService_DumpMacipACLClient, error) {
122         stream := c.ch.SendMultiRequest(in)
123         x := &serviceClient_DumpMacipACLClient{stream}
124         return x, nil
125 }
126
127 type RPCService_DumpMacipACLClient interface {
128         Recv() (*MacipACLDetails, error)
129 }
130
131 type serviceClient_DumpMacipACLClient struct {
132         api.MultiRequestCtx
133 }
134
135 func (c *serviceClient_DumpMacipACLClient) Recv() (*MacipACLDetails, error) {
136         m := new(MacipACLDetails)
137         stop, err := c.MultiRequestCtx.ReceiveReply(m)
138         if err != nil {
139                 return nil, err
140         }
141         if stop {
142                 return nil, io.EOF
143         }
144         return m, nil
145 }
146
147 func (c *serviceClient) DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_DumpMacipACLInterfaceListClient, error) {
148         stream := c.ch.SendMultiRequest(in)
149         x := &serviceClient_DumpMacipACLInterfaceListClient{stream}
150         return x, nil
151 }
152
153 type RPCService_DumpMacipACLInterfaceListClient interface {
154         Recv() (*MacipACLInterfaceListDetails, error)
155 }
156
157 type serviceClient_DumpMacipACLInterfaceListClient struct {
158         api.MultiRequestCtx
159 }
160
161 func (c *serviceClient_DumpMacipACLInterfaceListClient) Recv() (*MacipACLInterfaceListDetails, error) {
162         m := new(MacipACLInterfaceListDetails)
163         stop, err := c.MultiRequestCtx.ReceiveReply(m)
164         if err != nil {
165                 return nil, err
166         }
167         if stop {
168                 return nil, io.EOF
169         }
170         return m, nil
171 }
172
173 func (c *serviceClient) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error) {
174         out := new(ACLAddReplaceReply)
175         err := c.ch.SendRequest(in).ReceiveReply(out)
176         if err != nil {
177                 return nil, err
178         }
179         return out, nil
180 }
181
182 func (c *serviceClient) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error) {
183         out := new(ACLDelReply)
184         err := c.ch.SendRequest(in).ReceiveReply(out)
185         if err != nil {
186                 return nil, err
187         }
188         return out, nil
189 }
190
191 func (c *serviceClient) ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error) {
192         out := new(ACLInterfaceAddDelReply)
193         err := c.ch.SendRequest(in).ReceiveReply(out)
194         if err != nil {
195                 return nil, err
196         }
197         return out, nil
198 }
199
200 func (c *serviceClient) ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error) {
201         out := new(ACLInterfaceSetACLListReply)
202         err := c.ch.SendRequest(in).ReceiveReply(out)
203         if err != nil {
204                 return nil, err
205         }
206         return out, nil
207 }
208
209 func (c *serviceClient) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) {
210         out := new(ACLInterfaceSetEtypeWhitelistReply)
211         err := c.ch.SendRequest(in).ReceiveReply(out)
212         if err != nil {
213                 return nil, err
214         }
215         return out, nil
216 }
217
218 func (c *serviceClient) ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) {
219         out := new(ACLPluginControlPingReply)
220         err := c.ch.SendRequest(in).ReceiveReply(out)
221         if err != nil {
222                 return nil, err
223         }
224         return out, nil
225 }
226
227 func (c *serviceClient) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) {
228         out := new(ACLPluginGetConnTableMaxEntriesReply)
229         err := c.ch.SendRequest(in).ReceiveReply(out)
230         if err != nil {
231                 return nil, err
232         }
233         return out, nil
234 }
235
236 func (c *serviceClient) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) {
237         out := new(ACLPluginGetVersionReply)
238         err := c.ch.SendRequest(in).ReceiveReply(out)
239         if err != nil {
240                 return nil, err
241         }
242         return out, nil
243 }
244
245 func (c *serviceClient) ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error) {
246         out := new(ACLStatsIntfCountersEnableReply)
247         err := c.ch.SendRequest(in).ReceiveReply(out)
248         if err != nil {
249                 return nil, err
250         }
251         return out, nil
252 }
253
254 func (c *serviceClient) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) {
255         out := new(MacipACLAddReply)
256         err := c.ch.SendRequest(in).ReceiveReply(out)
257         if err != nil {
258                 return nil, err
259         }
260         return out, nil
261 }
262
263 func (c *serviceClient) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) {
264         out := new(MacipACLAddReplaceReply)
265         err := c.ch.SendRequest(in).ReceiveReply(out)
266         if err != nil {
267                 return nil, err
268         }
269         return out, nil
270 }
271
272 func (c *serviceClient) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error) {
273         out := new(MacipACLDelReply)
274         err := c.ch.SendRequest(in).ReceiveReply(out)
275         if err != nil {
276                 return nil, err
277         }
278         return out, nil
279 }
280
281 func (c *serviceClient) MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error) {
282         out := new(MacipACLInterfaceAddDelReply)
283         err := c.ch.SendRequest(in).ReceiveReply(out)
284         if err != nil {
285                 return nil, err
286         }
287         return out, nil
288 }
289
290 func (c *serviceClient) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) {
291         out := new(MacipACLInterfaceGetReply)
292         err := c.ch.SendRequest(in).ReceiveReply(out)
293         if err != nil {
294                 return nil, err
295         }
296         return out, nil
297 }
298
299 // Reference imports to suppress errors if they are not otherwise used.
300 var _ = api.RegisterMessage
301 var _ = context.Background
302 var _ = io.Copy