aboutsummaryrefslogtreecommitdiffstats
path: root/examples/binapi/acl/acl.ba.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/binapi/acl/acl.ba.go')
-rw-r--r--examples/binapi/acl/acl.ba.go373
1 files changed, 209 insertions, 164 deletions
diff --git a/examples/binapi/acl/acl.ba.go b/examples/binapi/acl/acl.ba.go
index 6708e74..1f9528e 100644
--- a/examples/binapi/acl/acl.ba.go
+++ b/examples/binapi/acl/acl.ba.go
@@ -1,34 +1,24 @@
-// Code generated by GoVPP binapi-generator. DO NOT EDIT.
+// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// source: /usr/share/vpp/api/plugins/acl.api.json
/*
-Package acl is a generated from VPP binary API module 'acl'.
+Package acl is a generated VPP binary API for 'acl' module.
- The acl module consists of:
+It consists of:
2 types
36 messages
18 services
*/
package acl
-import api "git.fd.io/govpp.git/api"
-import bytes "bytes"
-import context "context"
-import strconv "strconv"
-import struc "github.com/lunixbochs/struc"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = api.RegisterMessage
-var _ = bytes.NewBuffer
-var _ = context.Background
-var _ = strconv.Itoa
-var _ = struc.Pack
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
+import (
+ bytes "bytes"
+ context "context"
+ api "git.fd.io/govpp.git/api"
+ struc "github.com/lunixbochs/struc"
+ io "io"
+ strconv "strconv"
+)
const (
// ModuleName is the name of this module.
@@ -39,9 +29,7 @@ const (
VersionCrc = 0x8ed22cb9
)
-/* Types */
-
-// ACLRule represents VPP binary API type 'acl_rule':
+// ACLRule represents VPP binary API type 'acl_rule'.
type ACLRule struct {
IsPermit uint8
IsIPv6 uint8
@@ -65,7 +53,7 @@ func (*ACLRule) GetCrcString() string {
return "6f99bf4d"
}
-// MacipACLRule represents VPP binary API type 'macip_acl_rule':
+// MacipACLRule represents VPP binary API type 'macip_acl_rule'.
type MacipACLRule struct {
IsPermit uint8
IsIPv6 uint8
@@ -82,9 +70,7 @@ func (*MacipACLRule) GetCrcString() string {
return "70589f1e"
}
-/* Messages */
-
-// ACLAddReplace represents VPP binary API message 'acl_add_replace':
+// ACLAddReplace represents VPP binary API message 'acl_add_replace'.
type ACLAddReplace struct {
ACLIndex uint32
Tag []byte `struc:"[64]byte"`
@@ -102,7 +88,7 @@ func (*ACLAddReplace) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLAddReplaceReply represents VPP binary API message 'acl_add_replace_reply':
+// ACLAddReplaceReply represents VPP binary API message 'acl_add_replace_reply'.
type ACLAddReplaceReply struct {
ACLIndex uint32
Retval int32
@@ -118,7 +104,7 @@ func (*ACLAddReplaceReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLDel represents VPP binary API message 'acl_del':
+// ACLDel represents VPP binary API message 'acl_del'.
type ACLDel struct {
ACLIndex uint32
}
@@ -133,7 +119,7 @@ func (*ACLDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLDelReply represents VPP binary API message 'acl_del_reply':
+// ACLDelReply represents VPP binary API message 'acl_del_reply'.
type ACLDelReply struct {
Retval int32
}
@@ -148,7 +134,7 @@ func (*ACLDelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLDetails represents VPP binary API message 'acl_details':
+// ACLDetails represents VPP binary API message 'acl_details'.
type ACLDetails struct {
ACLIndex uint32
Tag []byte `struc:"[64]byte"`
@@ -166,7 +152,7 @@ func (*ACLDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLDump represents VPP binary API message 'acl_dump':
+// ACLDump represents VPP binary API message 'acl_dump'.
type ACLDump struct {
ACLIndex uint32
}
@@ -181,7 +167,7 @@ func (*ACLDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLInterfaceAddDel represents VPP binary API message 'acl_interface_add_del':
+// ACLInterfaceAddDel represents VPP binary API message 'acl_interface_add_del'.
type ACLInterfaceAddDel struct {
IsAdd uint8
IsInput uint8
@@ -199,7 +185,7 @@ func (*ACLInterfaceAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLInterfaceAddDelReply represents VPP binary API message 'acl_interface_add_del_reply':
+// ACLInterfaceAddDelReply represents VPP binary API message 'acl_interface_add_del_reply'.
type ACLInterfaceAddDelReply struct {
Retval int32
}
@@ -214,7 +200,7 @@ func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLInterfaceEtypeWhitelistDetails represents VPP binary API message 'acl_interface_etype_whitelist_details':
+// ACLInterfaceEtypeWhitelistDetails represents VPP binary API message 'acl_interface_etype_whitelist_details'.
type ACLInterfaceEtypeWhitelistDetails struct {
SwIfIndex uint32
Count uint8 `struc:"sizeof=Whitelist"`
@@ -232,7 +218,7 @@ func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLInterfaceEtypeWhitelistDump represents VPP binary API message 'acl_interface_etype_whitelist_dump':
+// ACLInterfaceEtypeWhitelistDump represents VPP binary API message 'acl_interface_etype_whitelist_dump'.
type ACLInterfaceEtypeWhitelistDump struct {
SwIfIndex uint32
}
@@ -247,7 +233,7 @@ func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLInterfaceListDetails represents VPP binary API message 'acl_interface_list_details':
+// ACLInterfaceListDetails represents VPP binary API message 'acl_interface_list_details'.
type ACLInterfaceListDetails struct {
SwIfIndex uint32
Count uint8 `struc:"sizeof=Acls"`
@@ -265,7 +251,7 @@ func (*ACLInterfaceListDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLInterfaceListDump represents VPP binary API message 'acl_interface_list_dump':
+// ACLInterfaceListDump represents VPP binary API message 'acl_interface_list_dump'.
type ACLInterfaceListDump struct {
SwIfIndex uint32
}
@@ -280,7 +266,7 @@ func (*ACLInterfaceListDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLInterfaceSetACLList represents VPP binary API message 'acl_interface_set_acl_list':
+// ACLInterfaceSetACLList represents VPP binary API message 'acl_interface_set_acl_list'.
type ACLInterfaceSetACLList struct {
SwIfIndex uint32
Count uint8 `struc:"sizeof=Acls"`
@@ -298,7 +284,7 @@ func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLInterfaceSetACLListReply represents VPP binary API message 'acl_interface_set_acl_list_reply':
+// ACLInterfaceSetACLListReply represents VPP binary API message 'acl_interface_set_acl_list_reply'.
type ACLInterfaceSetACLListReply struct {
Retval int32
}
@@ -313,7 +299,7 @@ func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLInterfaceSetEtypeWhitelist represents VPP binary API message 'acl_interface_set_etype_whitelist':
+// ACLInterfaceSetEtypeWhitelist represents VPP binary API message 'acl_interface_set_etype_whitelist'.
type ACLInterfaceSetEtypeWhitelist struct {
SwIfIndex uint32
Count uint8 `struc:"sizeof=Whitelist"`
@@ -331,7 +317,7 @@ func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLInterfaceSetEtypeWhitelistReply represents VPP binary API message 'acl_interface_set_etype_whitelist_reply':
+// ACLInterfaceSetEtypeWhitelistReply represents VPP binary API message 'acl_interface_set_etype_whitelist_reply'.
type ACLInterfaceSetEtypeWhitelistReply struct {
Retval int32
}
@@ -346,7 +332,7 @@ func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLPluginControlPing represents VPP binary API message 'acl_plugin_control_ping':
+// ACLPluginControlPing represents VPP binary API message 'acl_plugin_control_ping'.
type ACLPluginControlPing struct{}
func (*ACLPluginControlPing) GetMessageName() string {
@@ -359,7 +345,7 @@ func (*ACLPluginControlPing) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLPluginControlPingReply represents VPP binary API message 'acl_plugin_control_ping_reply':
+// ACLPluginControlPingReply represents VPP binary API message 'acl_plugin_control_ping_reply'.
type ACLPluginControlPingReply struct {
Retval int32
ClientIndex uint32
@@ -376,7 +362,7 @@ func (*ACLPluginControlPingReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLPluginGetConnTableMaxEntries represents VPP binary API message 'acl_plugin_get_conn_table_max_entries':
+// ACLPluginGetConnTableMaxEntries represents VPP binary API message 'acl_plugin_get_conn_table_max_entries'.
type ACLPluginGetConnTableMaxEntries struct{}
func (*ACLPluginGetConnTableMaxEntries) GetMessageName() string {
@@ -389,7 +375,7 @@ func (*ACLPluginGetConnTableMaxEntries) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLPluginGetConnTableMaxEntriesReply represents VPP binary API message 'acl_plugin_get_conn_table_max_entries_reply':
+// ACLPluginGetConnTableMaxEntriesReply represents VPP binary API message 'acl_plugin_get_conn_table_max_entries_reply'.
type ACLPluginGetConnTableMaxEntriesReply struct {
ConnTableMaxEntries uint64
}
@@ -404,7 +390,7 @@ func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// ACLPluginGetVersion represents VPP binary API message 'acl_plugin_get_version':
+// ACLPluginGetVersion represents VPP binary API message 'acl_plugin_get_version'.
type ACLPluginGetVersion struct{}
func (*ACLPluginGetVersion) GetMessageName() string {
@@ -417,7 +403,7 @@ func (*ACLPluginGetVersion) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// ACLPluginGetVersionReply represents VPP binary API message 'acl_plugin_get_version_reply':
+// ACLPluginGetVersionReply represents VPP binary API message 'acl_plugin_get_version_reply'.
type ACLPluginGetVersionReply struct {
Major uint32
Minor uint32
@@ -433,7 +419,7 @@ func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// MacipACLAdd represents VPP binary API message 'macip_acl_add':
+// MacipACLAdd represents VPP binary API message 'macip_acl_add'.
type MacipACLAdd struct {
Tag []byte `struc:"[64]byte"`
Count uint32 `struc:"sizeof=R"`
@@ -450,7 +436,7 @@ func (*MacipACLAdd) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// MacipACLAddReplace represents VPP binary API message 'macip_acl_add_replace':
+// MacipACLAddReplace represents VPP binary API message 'macip_acl_add_replace'.
type MacipACLAddReplace struct {
ACLIndex uint32
Tag []byte `struc:"[64]byte"`
@@ -468,7 +454,7 @@ func (*MacipACLAddReplace) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// MacipACLAddReplaceReply represents VPP binary API message 'macip_acl_add_replace_reply':
+// MacipACLAddReplaceReply represents VPP binary API message 'macip_acl_add_replace_reply'.
type MacipACLAddReplaceReply struct {
ACLIndex uint32
Retval int32
@@ -484,7 +470,7 @@ func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// MacipACLAddReply represents VPP binary API message 'macip_acl_add_reply':
+// MacipACLAddReply represents VPP binary API message 'macip_acl_add_reply'.
type MacipACLAddReply struct {
ACLIndex uint32
Retval int32
@@ -500,7 +486,7 @@ func (*MacipACLAddReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// MacipACLDel represents VPP binary API message 'macip_acl_del':
+// MacipACLDel represents VPP binary API message 'macip_acl_del'.
type MacipACLDel struct {
ACLIndex uint32
}
@@ -515,7 +501,7 @@ func (*MacipACLDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// MacipACLDelReply represents VPP binary API message 'macip_acl_del_reply':
+// MacipACLDelReply represents VPP binary API message 'macip_acl_del_reply'.
type MacipACLDelReply struct {
Retval int32
}
@@ -530,7 +516,7 @@ func (*MacipACLDelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// MacipACLDetails represents VPP binary API message 'macip_acl_details':
+// MacipACLDetails represents VPP binary API message 'macip_acl_details'.
type MacipACLDetails struct {
ACLIndex uint32
Tag []byte `struc:"[64]byte"`
@@ -548,7 +534,7 @@ func (*MacipACLDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// MacipACLDump represents VPP binary API message 'macip_acl_dump':
+// MacipACLDump represents VPP binary API message 'macip_acl_dump'.
type MacipACLDump struct {
ACLIndex uint32
}
@@ -563,7 +549,7 @@ func (*MacipACLDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// MacipACLInterfaceAddDel represents VPP binary API message 'macip_acl_interface_add_del':
+// MacipACLInterfaceAddDel represents VPP binary API message 'macip_acl_interface_add_del'.
type MacipACLInterfaceAddDel struct {
IsAdd uint8
SwIfIndex uint32
@@ -580,7 +566,7 @@ func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// MacipACLInterfaceAddDelReply represents VPP binary API message 'macip_acl_interface_add_del_reply':
+// MacipACLInterfaceAddDelReply represents VPP binary API message 'macip_acl_interface_add_del_reply'.
type MacipACLInterfaceAddDelReply struct {
Retval int32
}
@@ -595,7 +581,7 @@ func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// MacipACLInterfaceGet represents VPP binary API message 'macip_acl_interface_get':
+// MacipACLInterfaceGet represents VPP binary API message 'macip_acl_interface_get'.
type MacipACLInterfaceGet struct{}
func (*MacipACLInterfaceGet) GetMessageName() string {
@@ -608,7 +594,7 @@ func (*MacipACLInterfaceGet) GetMessageType() api.MessageType {
return api.RequestMessage
}
-// MacipACLInterfaceGetReply represents VPP binary API message 'macip_acl_interface_get_reply':
+// MacipACLInterfaceGetReply represents VPP binary API message 'macip_acl_interface_get_reply'.
type MacipACLInterfaceGetReply struct {
Count uint32 `struc:"sizeof=Acls"`
Acls []uint32
@@ -624,7 +610,7 @@ func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// MacipACLInterfaceListDetails represents VPP binary API message 'macip_acl_interface_list_details':
+// MacipACLInterfaceListDetails represents VPP binary API message 'macip_acl_interface_list_details'.
type MacipACLInterfaceListDetails struct {
SwIfIndex uint32
Count uint8 `struc:"sizeof=Acls"`
@@ -641,7 +627,7 @@ func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-// MacipACLInterfaceListDump represents VPP binary API message 'macip_acl_interface_list_dump':
+// MacipACLInterfaceListDump represents VPP binary API message 'macip_acl_interface_list_dump'.
type MacipACLInterfaceListDump struct {
SwIfIndex uint32
}
@@ -737,13 +723,13 @@ func AllMessages() []api.Message {
}
}
-// Service represents VPP binary API services in acl module.
-type Service interface {
- DumpACL(ctx context.Context, in *ACLDump) ([]*ACLDetails, error)
- DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) ([]*ACLInterfaceEtypeWhitelistDetails, error)
- DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) ([]*ACLInterfaceListDetails, error)
- DumpMacipACL(ctx context.Context, in *MacipACLDump) ([]*MacipACLDetails, error)
- DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) ([]*MacipACLInterfaceListDetails, error)
+// RPCService represents RPC service API for acl module.
+type RPCService interface {
+ DumpACL(ctx context.Context, in *ACLDump) (RPCService_DumpACLClient, error)
+ DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_DumpACLInterfaceEtypeWhitelistClient, error)
+ DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) (RPCService_DumpACLInterfaceListClient, error)
+ DumpMacipACL(ctx context.Context, in *MacipACLDump) (RPCService_DumpMacipACLClient, error)
+ DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_DumpMacipACLInterfaceListClient, error)
ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error)
ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error)
ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error)
@@ -759,100 +745,145 @@ type Service interface {
MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error)
}
-type service struct {
+type serviceClient struct {
ch api.Channel
}
-func NewService(ch api.Channel) Service {
- return &service{ch}
+func NewServiceClient(ch api.Channel) RPCService {
+ return &serviceClient{ch}
+}
+
+func (c *serviceClient) DumpACL(ctx context.Context, in *ACLDump) (RPCService_DumpACLClient, error) {
+ stream := c.ch.SendMultiRequest(in)
+ x := &serviceClient_DumpACLClient{stream}
+ return x, nil
+}
+
+type RPCService_DumpACLClient interface {
+ Recv() (*ACLDetails, error)
+}
+
+type serviceClient_DumpACLClient struct {
+ api.MultiRequestCtx
+}
+
+func (c *serviceClient_DumpACLClient) Recv() (*ACLDetails, error) {
+ m := new(ACLDetails)
+ stop, err := c.MultiRequestCtx.ReceiveReply(m)
+ if err != nil {
+ return nil, err
+ }
+ if stop {
+ return nil, io.EOF
+ }
+ return m, nil
+}
+
+func (c *serviceClient) DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_DumpACLInterfaceEtypeWhitelistClient, error) {
+ stream := c.ch.SendMultiRequest(in)
+ x := &serviceClient_DumpACLInterfaceEtypeWhitelistClient{stream}
+ return x, nil
+}
+
+type RPCService_DumpACLInterfaceEtypeWhitelistClient interface {
+ Recv() (*ACLInterfaceEtypeWhitelistDetails, error)
+}
+
+type serviceClient_DumpACLInterfaceEtypeWhitelistClient struct {
+ api.MultiRequestCtx
+}
+
+func (c *serviceClient_DumpACLInterfaceEtypeWhitelistClient) Recv() (*ACLInterfaceEtypeWhitelistDetails, error) {
+ m := new(ACLInterfaceEtypeWhitelistDetails)
+ stop, err := c.MultiRequestCtx.ReceiveReply(m)
+ if err != nil {
+ return nil, err
+ }
+ if stop {
+ return nil, io.EOF
+ }
+ return m, nil
+}
+
+func (c *serviceClient) DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) (RPCService_DumpACLInterfaceListClient, error) {
+ stream := c.ch.SendMultiRequest(in)
+ x := &serviceClient_DumpACLInterfaceListClient{stream}
+ return x, nil
+}
+
+type RPCService_DumpACLInterfaceListClient interface {
+ Recv() (*ACLInterfaceListDetails, error)
}
-func (c *service) DumpACL(ctx context.Context, in *ACLDump) ([]*ACLDetails, error) {
- var dump []*ACLDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(ACLDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
+type serviceClient_DumpACLInterfaceListClient struct {
+ api.MultiRequestCtx
+}
+
+func (c *serviceClient_DumpACLInterfaceListClient) Recv() (*ACLInterfaceListDetails, error) {
+ m := new(ACLInterfaceListDetails)
+ stop, err := c.MultiRequestCtx.ReceiveReply(m)
+ if err != nil {
+ return nil, err
}
- return dump, nil
-}
-
-func (c *service) DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) ([]*ACLInterfaceEtypeWhitelistDetails, error) {
- var dump []*ACLInterfaceEtypeWhitelistDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(ACLInterfaceEtypeWhitelistDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
+ if stop {
+ return nil, io.EOF
}
- return dump, nil
-}
-
-func (c *service) DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) ([]*ACLInterfaceListDetails, error) {
- var dump []*ACLInterfaceListDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(ACLInterfaceListDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
+ return m, nil
+}
+
+func (c *serviceClient) DumpMacipACL(ctx context.Context, in *MacipACLDump) (RPCService_DumpMacipACLClient, error) {
+ stream := c.ch.SendMultiRequest(in)
+ x := &serviceClient_DumpMacipACLClient{stream}
+ return x, nil
+}
+
+type RPCService_DumpMacipACLClient interface {
+ Recv() (*MacipACLDetails, error)
+}
+
+type serviceClient_DumpMacipACLClient struct {
+ api.MultiRequestCtx
+}
+
+func (c *serviceClient_DumpMacipACLClient) Recv() (*MacipACLDetails, error) {
+ m := new(MacipACLDetails)
+ stop, err := c.MultiRequestCtx.ReceiveReply(m)
+ if err != nil {
+ return nil, err
}
- return dump, nil
-}
-
-func (c *service) DumpMacipACL(ctx context.Context, in *MacipACLDump) ([]*MacipACLDetails, error) {
- var dump []*MacipACLDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(MacipACLDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
+ if stop {
+ return nil, io.EOF
}
- return dump, nil
-}
-
-func (c *service) DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) ([]*MacipACLInterfaceListDetails, error) {
- var dump []*MacipACLInterfaceListDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(MacipACLInterfaceListDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
+ return m, nil
+}
+
+func (c *serviceClient) DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_DumpMacipACLInterfaceListClient, error) {
+ stream := c.ch.SendMultiRequest(in)
+ x := &serviceClient_DumpMacipACLInterfaceListClient{stream}
+ return x, nil
+}
+
+type RPCService_DumpMacipACLInterfaceListClient interface {
+ Recv() (*MacipACLInterfaceListDetails, error)
+}
+
+type serviceClient_DumpMacipACLInterfaceListClient struct {
+ api.MultiRequestCtx
+}
+
+func (c *serviceClient_DumpMacipACLInterfaceListClient) Recv() (*MacipACLInterfaceListDetails, error) {
+ m := new(MacipACLInterfaceListDetails)
+ stop, err := c.MultiRequestCtx.ReceiveReply(m)
+ if err != nil {
+ return nil, err
+ }
+ if stop {
+ return nil, io.EOF
}
- return dump, nil
+ return m, nil
}
-func (c *service) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error) {
+func (c *serviceClient) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error) {
out := new(ACLAddReplaceReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -861,7 +892,7 @@ func (c *service) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAdd
return out, nil
}
-func (c *service) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error) {
+func (c *serviceClient) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error) {
out := new(ACLDelReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -870,7 +901,7 @@ func (c *service) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error)
return out, nil
}
-func (c *service) ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error) {
+func (c *serviceClient) ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error) {
out := new(ACLInterfaceAddDelReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -879,7 +910,7 @@ func (c *service) ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel
return out, nil
}
-func (c *service) ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error) {
+func (c *serviceClient) ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error) {
out := new(ACLInterfaceSetACLListReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -888,7 +919,7 @@ func (c *service) ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSe
return out, nil
}
-func (c *service) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) {
+func (c *serviceClient) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) {
out := new(ACLInterfaceSetEtypeWhitelistReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -897,7 +928,7 @@ func (c *service) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInte
return out, nil
}
-func (c *service) ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) {
+func (c *serviceClient) ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) {
out := new(ACLPluginControlPingReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -906,7 +937,7 @@ func (c *service) ACLPluginControlPing(ctx context.Context, in *ACLPluginControl
return out, nil
}
-func (c *service) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) {
+func (c *serviceClient) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) {
out := new(ACLPluginGetConnTableMaxEntriesReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -915,7 +946,7 @@ func (c *service) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPl
return out, nil
}
-func (c *service) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) {
+func (c *serviceClient) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) {
out := new(ACLPluginGetVersionReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -924,7 +955,7 @@ func (c *service) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersi
return out, nil
}
-func (c *service) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) {
+func (c *serviceClient) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) {
out := new(MacipACLAddReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -933,7 +964,7 @@ func (c *service) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAd
return out, nil
}
-func (c *service) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) {
+func (c *serviceClient) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) {
out := new(MacipACLAddReplaceReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -942,7 +973,7 @@ func (c *service) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace
return out, nil
}
-func (c *service) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error) {
+func (c *serviceClient) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error) {
out := new(MacipACLDelReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -951,7 +982,7 @@ func (c *service) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDe
return out, nil
}
-func (c *service) MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error) {
+func (c *serviceClient) MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error) {
out := new(MacipACLInterfaceAddDelReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -960,7 +991,7 @@ func (c *service) MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInter
return out, nil
}
-func (c *service) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) {
+func (c *serviceClient) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) {
out := new(MacipACLInterfaceGetReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
@@ -968,3 +999,17 @@ func (c *service) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfac
}
return out, nil
}
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the GoVPP api package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// GoVPP api package needs to be updated.
+const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = api.RegisterMessage
+var _ = bytes.NewBuffer
+var _ = context.Background
+var _ = io.Copy
+var _ = strconv.Itoa
+var _ = struc.Pack