diff options
Diffstat (limited to 'binapi/tcp')
-rw-r--r-- | binapi/tcp/tcp.ba.go | 16 | ||||
-rw-r--r-- | binapi/tcp/tcp_rest.ba.go | 37 | ||||
-rw-r--r-- | binapi/tcp/tcp_rpc.ba.go | 7 |
3 files changed, 12 insertions, 48 deletions
diff --git a/binapi/tcp/tcp.ba.go b/binapi/tcp/tcp.ba.go index 7ae3ecc..1176381 100644 --- a/binapi/tcp/tcp.ba.go +++ b/binapi/tcp/tcp.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/tcp.api.json // Package tcp contains generated bindings for API file tcp.api. @@ -12,9 +12,9 @@ package tcp import ( - api "git.fd.io/govpp.git/api" - ip_types "git.fd.io/govpp.git/binapi/ip_types" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + ip_types "go.fd.io/govpp/binapi/ip_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 = "tcp" APIVersion = "2.0.0" - VersionCrc = 0xf586c9ba + VersionCrc = 0x93d07485 ) // TCPConfigureSrcAddresses defines message 'tcp_configure_src_addresses'. @@ -38,7 +38,7 @@ type TCPConfigureSrcAddresses struct { func (m *TCPConfigureSrcAddresses) Reset() { *m = TCPConfigureSrcAddresses{} } func (*TCPConfigureSrcAddresses) GetMessageName() string { return "tcp_configure_src_addresses" } -func (*TCPConfigureSrcAddresses) GetCrcString() string { return "4b02b946" } +func (*TCPConfigureSrcAddresses) GetCrcString() string { return "67eede0d" } func (*TCPConfigureSrcAddresses) GetMessageType() api.MessageType { return api.RequestMessage } @@ -113,7 +113,7 @@ func (m *TCPConfigureSrcAddressesReply) Unmarshal(b []byte) error { func init() { file_tcp_binapi_init() } func file_tcp_binapi_init() { - api.RegisterMessage((*TCPConfigureSrcAddresses)(nil), "tcp_configure_src_addresses_4b02b946") + api.RegisterMessage((*TCPConfigureSrcAddresses)(nil), "tcp_configure_src_addresses_67eede0d") api.RegisterMessage((*TCPConfigureSrcAddressesReply)(nil), "tcp_configure_src_addresses_reply_e8d4e804") } diff --git a/binapi/tcp/tcp_rest.ba.go b/binapi/tcp/tcp_rest.ba.go deleted file mode 100644 index 8fa0b79..0000000 --- a/binapi/tcp/tcp_rest.ba.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by GoVPP's binapi-generator. DO NOT EDIT. - -package tcp - -import ( - "encoding/json" - "io/ioutil" - "net/http" -) - -func RESTHandler(rpc RPCService) http.Handler { - mux := http.NewServeMux() - mux.HandleFunc("/tcp_configure_src_addresses", func(w http.ResponseWriter, req *http.Request) { - var request = new(TCPConfigureSrcAddresses) - 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.TCPConfigureSrcAddresses(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/tcp/tcp_rpc.ba.go b/binapi/tcp/tcp_rpc.ba.go index 8be3619..5a28d67 100644 --- a/binapi/tcp/tcp_rpc.ba.go +++ b/binapi/tcp/tcp_rpc.ba.go @@ -4,10 +4,11 @@ package tcp import ( "context" - api "git.fd.io/govpp.git/api" + + api "go.fd.io/govpp/api" ) -// RPCService defines RPC service tcp. +// RPCService defines RPC service tcp. type RPCService interface { TCPConfigureSrcAddresses(ctx context.Context, in *TCPConfigureSrcAddresses) (*TCPConfigureSrcAddressesReply, error) } @@ -26,5 +27,5 @@ func (c *serviceClient) TCPConfigureSrcAddresses(ctx context.Context, in *TCPCon if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } |