1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "git.fd.io/govpp.git/api"
11 vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
14 // RPCService defines RPC service acl.
15 type RPCService interface {
16 ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error)
17 ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error)
18 ACLDump(ctx context.Context, in *ACLDump) (RPCService_ACLDumpClient, error)
19 ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error)
20 ACLInterfaceEtypeWhitelistDump(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_ACLInterfaceEtypeWhitelistDumpClient, error)
21 ACLInterfaceListDump(ctx context.Context, in *ACLInterfaceListDump) (RPCService_ACLInterfaceListDumpClient, 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 MacipACLDump(ctx context.Context, in *MacipACLDump) (RPCService_MacipACLDumpClient, error)
32 MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error)
33 MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error)
34 MacipACLInterfaceListDump(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_MacipACLInterfaceListDumpClient, error)
37 type serviceClient struct {
41 func NewServiceClient(conn api.Connection) RPCService {
42 return &serviceClient{conn}
45 func (c *serviceClient) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error) {
46 out := new(ACLAddReplaceReply)
47 err := c.conn.Invoke(ctx, in, out)
51 return out, api.RetvalToVPPApiError(out.Retval)
54 func (c *serviceClient) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error) {
55 out := new(ACLDelReply)
56 err := c.conn.Invoke(ctx, in, out)
60 return out, api.RetvalToVPPApiError(out.Retval)
63 func (c *serviceClient) ACLDump(ctx context.Context, in *ACLDump) (RPCService_ACLDumpClient, error) {
64 stream, err := c.conn.NewStream(ctx)
68 x := &serviceClient_ACLDumpClient{stream}
69 if err := x.Stream.SendMsg(in); err != nil {
72 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
78 type RPCService_ACLDumpClient interface {
79 Recv() (*ACLDetails, error)
83 type serviceClient_ACLDumpClient struct {
87 func (c *serviceClient_ACLDumpClient) Recv() (*ACLDetails, error) {
88 msg, err := c.Stream.RecvMsg()
92 switch m := msg.(type) {
95 case *vpe.ControlPingReply:
96 err = c.Stream.Close()
102 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
106 func (c *serviceClient) ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error) {
107 out := new(ACLInterfaceAddDelReply)
108 err := c.conn.Invoke(ctx, in, out)
112 return out, api.RetvalToVPPApiError(out.Retval)
115 func (c *serviceClient) ACLInterfaceEtypeWhitelistDump(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_ACLInterfaceEtypeWhitelistDumpClient, error) {
116 stream, err := c.conn.NewStream(ctx)
120 x := &serviceClient_ACLInterfaceEtypeWhitelistDumpClient{stream}
121 if err := x.Stream.SendMsg(in); err != nil {
124 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
130 type RPCService_ACLInterfaceEtypeWhitelistDumpClient interface {
131 Recv() (*ACLInterfaceEtypeWhitelistDetails, error)
135 type serviceClient_ACLInterfaceEtypeWhitelistDumpClient struct {
139 func (c *serviceClient_ACLInterfaceEtypeWhitelistDumpClient) Recv() (*ACLInterfaceEtypeWhitelistDetails, error) {
140 msg, err := c.Stream.RecvMsg()
144 switch m := msg.(type) {
145 case *ACLInterfaceEtypeWhitelistDetails:
147 case *vpe.ControlPingReply:
148 err = c.Stream.Close()
154 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
158 func (c *serviceClient) ACLInterfaceListDump(ctx context.Context, in *ACLInterfaceListDump) (RPCService_ACLInterfaceListDumpClient, error) {
159 stream, err := c.conn.NewStream(ctx)
163 x := &serviceClient_ACLInterfaceListDumpClient{stream}
164 if err := x.Stream.SendMsg(in); err != nil {
167 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
173 type RPCService_ACLInterfaceListDumpClient interface {
174 Recv() (*ACLInterfaceListDetails, error)
178 type serviceClient_ACLInterfaceListDumpClient struct {
182 func (c *serviceClient_ACLInterfaceListDumpClient) Recv() (*ACLInterfaceListDetails, error) {
183 msg, err := c.Stream.RecvMsg()
187 switch m := msg.(type) {
188 case *ACLInterfaceListDetails:
190 case *vpe.ControlPingReply:
191 err = c.Stream.Close()
197 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
201 func (c *serviceClient) ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error) {
202 out := new(ACLInterfaceSetACLListReply)
203 err := c.conn.Invoke(ctx, in, out)
207 return out, api.RetvalToVPPApiError(out.Retval)
210 func (c *serviceClient) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) {
211 out := new(ACLInterfaceSetEtypeWhitelistReply)
212 err := c.conn.Invoke(ctx, in, out)
216 return out, api.RetvalToVPPApiError(out.Retval)
219 func (c *serviceClient) ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) {
220 out := new(ACLPluginControlPingReply)
221 err := c.conn.Invoke(ctx, in, out)
225 return out, api.RetvalToVPPApiError(out.Retval)
228 func (c *serviceClient) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) {
229 out := new(ACLPluginGetConnTableMaxEntriesReply)
230 err := c.conn.Invoke(ctx, in, out)
237 func (c *serviceClient) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) {
238 out := new(ACLPluginGetVersionReply)
239 err := c.conn.Invoke(ctx, in, out)
246 func (c *serviceClient) ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error) {
247 out := new(ACLStatsIntfCountersEnableReply)
248 err := c.conn.Invoke(ctx, in, out)
252 return out, api.RetvalToVPPApiError(out.Retval)
255 func (c *serviceClient) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) {
256 out := new(MacipACLAddReply)
257 err := c.conn.Invoke(ctx, in, out)
261 return out, api.RetvalToVPPApiError(out.Retval)
264 func (c *serviceClient) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) {
265 out := new(MacipACLAddReplaceReply)
266 err := c.conn.Invoke(ctx, in, out)
270 return out, api.RetvalToVPPApiError(out.Retval)
273 func (c *serviceClient) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error) {
274 out := new(MacipACLDelReply)
275 err := c.conn.Invoke(ctx, in, out)
279 return out, api.RetvalToVPPApiError(out.Retval)
282 func (c *serviceClient) MacipACLDump(ctx context.Context, in *MacipACLDump) (RPCService_MacipACLDumpClient, error) {
283 stream, err := c.conn.NewStream(ctx)
287 x := &serviceClient_MacipACLDumpClient{stream}
288 if err := x.Stream.SendMsg(in); err != nil {
291 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
297 type RPCService_MacipACLDumpClient interface {
298 Recv() (*MacipACLDetails, error)
302 type serviceClient_MacipACLDumpClient struct {
306 func (c *serviceClient_MacipACLDumpClient) Recv() (*MacipACLDetails, error) {
307 msg, err := c.Stream.RecvMsg()
311 switch m := msg.(type) {
312 case *MacipACLDetails:
314 case *vpe.ControlPingReply:
315 err = c.Stream.Close()
321 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
325 func (c *serviceClient) MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error) {
326 out := new(MacipACLInterfaceAddDelReply)
327 err := c.conn.Invoke(ctx, in, out)
331 return out, api.RetvalToVPPApiError(out.Retval)
334 func (c *serviceClient) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) {
335 out := new(MacipACLInterfaceGetReply)
336 err := c.conn.Invoke(ctx, in, out)
343 func (c *serviceClient) MacipACLInterfaceListDump(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_MacipACLInterfaceListDumpClient, error) {
344 stream, err := c.conn.NewStream(ctx)
348 x := &serviceClient_MacipACLInterfaceListDumpClient{stream}
349 if err := x.Stream.SendMsg(in); err != nil {
352 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
358 type RPCService_MacipACLInterfaceListDumpClient interface {
359 Recv() (*MacipACLInterfaceListDetails, error)
363 type serviceClient_MacipACLInterfaceListDumpClient struct {
367 func (c *serviceClient_MacipACLInterfaceListDumpClient) Recv() (*MacipACLInterfaceListDetails, error) {
368 msg, err := c.Stream.RecvMsg()
372 switch m := msg.(type) {
373 case *MacipACLInterfaceListDetails:
375 case *vpe.ControlPingReply:
376 err = c.Stream.Close()
382 return nil, fmt.Errorf("unexpected message: %T %v", m, m)