aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/mdata
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/mdata')
-rw-r--r--binapi/mdata/mdata.ba.go14
-rw-r--r--binapi/mdata/mdata_rest.ba.go37
-rw-r--r--binapi/mdata/mdata_rpc.ba.go7
3 files changed, 12 insertions, 46 deletions
diff --git a/binapi/mdata/mdata.ba.go b/binapi/mdata/mdata.ba.go
index d4715f7..3aab6f9 100644
--- a/binapi/mdata/mdata.ba.go
+++ b/binapi/mdata/mdata.ba.go
@@ -1,7 +1,7 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.6.0-dev
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/mdata.api.json
// Package mdata contains generated bindings for API file mdata.api.
@@ -12,9 +12,9 @@
package mdata
import (
- api "git.fd.io/govpp.git/api"
- _ "git.fd.io/govpp.git/binapi/interface_types"
- codec "git.fd.io/govpp.git/codec"
+ api "go.fd.io/govpp/api"
+ _ "go.fd.io/govpp/binapi/interface_types"
+ codec "go.fd.io/govpp/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -26,10 +26,11 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "mdata"
APIVersion = "0.1.0"
- VersionCrc = 0x3a1911dd
+ VersionCrc = 0x5bd69477
)
// MdataEnableDisable defines message 'mdata_enable_disable'.
+// InProgress: the message form may change in the future versions
type MdataEnableDisable struct {
EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
}
@@ -63,6 +64,7 @@ func (m *MdataEnableDisable) Unmarshal(b []byte) error {
}
// MdataEnableDisableReply defines message 'mdata_enable_disable_reply'.
+// InProgress: the message form may change in the future versions
type MdataEnableDisableReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
diff --git a/binapi/mdata/mdata_rest.ba.go b/binapi/mdata/mdata_rest.ba.go
deleted file mode 100644
index 12b22e7..0000000
--- a/binapi/mdata/mdata_rest.ba.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package mdata
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-func RESTHandler(rpc RPCService) http.Handler {
- mux := http.NewServeMux()
- mux.HandleFunc("/mdata_enable_disable", func(w http.ResponseWriter, req *http.Request) {
- var request = new(MdataEnableDisable)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.MdataEnableDisable(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- return http.HandlerFunc(mux.ServeHTTP)
-}
diff --git a/binapi/mdata/mdata_rpc.ba.go b/binapi/mdata/mdata_rpc.ba.go
index 08e05d5..717d5c7 100644
--- a/binapi/mdata/mdata_rpc.ba.go
+++ b/binapi/mdata/mdata_rpc.ba.go
@@ -4,10 +4,11 @@ package mdata
import (
"context"
- api "git.fd.io/govpp.git/api"
+
+ api "go.fd.io/govpp/api"
)
-// RPCService defines RPC service mdata.
+// RPCService defines RPC service mdata.
type RPCService interface {
MdataEnableDisable(ctx context.Context, in *MdataEnableDisable) (*MdataEnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) MdataEnableDisable(ctx context.Context, in *MdataEnableD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}