diff options
Diffstat (limited to 'binapi/rd_cp')
-rw-r--r-- | binapi/rd_cp/rd_cp.ba.go | 12 | ||||
-rw-r--r-- | binapi/rd_cp/rd_cp_rest.ba.go | 37 | ||||
-rw-r--r-- | binapi/rd_cp/rd_cp_rpc.ba.go | 7 |
3 files changed, 10 insertions, 46 deletions
diff --git a/binapi/rd_cp/rd_cp.ba.go b/binapi/rd_cp/rd_cp.ba.go index 8cafa0f..d88f710 100644 --- a/binapi/rd_cp/rd_cp.ba.go +++ b/binapi/rd_cp/rd_cp.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/core/rd_cp.api.json // Package rd_cp contains generated bindings for API file rd_cp.api. @@ -12,9 +12,9 @@ package rd_cp import ( - api "git.fd.io/govpp.git/api" - interface_types "git.fd.io/govpp.git/binapi/interface_types" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + interface_types "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,7 +26,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "rd_cp" APIVersion = "1.0.1" - VersionCrc = 0x2caa616 + VersionCrc = 0x871c3bee ) // IP6NdAddressAutoconfig defines message 'ip6_nd_address_autoconfig'. diff --git a/binapi/rd_cp/rd_cp_rest.ba.go b/binapi/rd_cp/rd_cp_rest.ba.go deleted file mode 100644 index 75e75a0..0000000 --- a/binapi/rd_cp/rd_cp_rest.ba.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by GoVPP's binapi-generator. DO NOT EDIT. - -package rd_cp - -import ( - "encoding/json" - "io/ioutil" - "net/http" -) - -func RESTHandler(rpc RPCService) http.Handler { - mux := http.NewServeMux() - mux.HandleFunc("/ip6_nd_address_autoconfig", func(w http.ResponseWriter, req *http.Request) { - var request = new(IP6NdAddressAutoconfig) - 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.IP6NdAddressAutoconfig(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/rd_cp/rd_cp_rpc.ba.go b/binapi/rd_cp/rd_cp_rpc.ba.go index af7ba12..2507f12 100644 --- a/binapi/rd_cp/rd_cp_rpc.ba.go +++ b/binapi/rd_cp/rd_cp_rpc.ba.go @@ -4,10 +4,11 @@ package rd_cp import ( "context" - api "git.fd.io/govpp.git/api" + + api "go.fd.io/govpp/api" ) -// RPCService defines RPC service rd_cp. +// RPCService defines RPC service rd_cp. type RPCService interface { IP6NdAddressAutoconfig(ctx context.Context, in *IP6NdAddressAutoconfig) (*IP6NdAddressAutoconfigReply, error) } @@ -26,5 +27,5 @@ func (c *serviceClient) IP6NdAddressAutoconfig(ctx context.Context, in *IP6NdAdd if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } |