X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Ftls_openssl%2Ftls_openssl_rest.ba.go;fp=binapi%2Ftls_openssl%2Ftls_openssl_rest.ba.go;h=0000000000000000000000000000000000000000;hb=c2456559a66107441addb96f673191bde09d6977;hp=bfabb439e6130d51efa9cfced2255dbf903d6bbc;hpb=f751f3f845ef56bbcdb873d81a1c6edbc5a87853;p=govpp.git diff --git a/binapi/tls_openssl/tls_openssl_rest.ba.go b/binapi/tls_openssl/tls_openssl_rest.ba.go deleted file mode 100644 index bfabb43..0000000 --- a/binapi/tls_openssl/tls_openssl_rest.ba.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by GoVPP's binapi-generator. DO NOT EDIT. - -package tls_openssl - -import ( - "encoding/json" - "io/ioutil" - "net/http" -) - -func RESTHandler(rpc RPCService) http.Handler { - mux := http.NewServeMux() - mux.HandleFunc("/tls_openssl_set_engine", func(w http.ResponseWriter, req *http.Request) { - var request = new(TLSOpensslSetEngine) - 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.TLSOpensslSetEngine(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) -}