Skip to content
Snippets Groups Projects
Commit 3764bce3 authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

wip

parent 3f5a04f1
No related branches found
No related tags found
2 merge requests!11Big boom integration,!6Draft: Akms ckms api implementation
Pipeline #181006 passed
......@@ -7,13 +7,11 @@ import (
"code.fbi.h-da.de/danet/quant/ekms/internal/kms"
)
// Define AKMSReceiverServer.
type AKMSReceiverServer struct {
ekms *kms.EKMS
server *http.Server
}
// create NewAKMSReceiver.
func NewAKMSReceiver(port string, ekms *kms.EKMS) *AKMSReceiverServer {
router := http.NewServeMux()
......@@ -50,16 +48,15 @@ type KMSKeyRequest struct {
}
func ksaReqHandler(w http.ResponseWriter, r *http.Request) {
// Parse the request body
var req KMSKeyRequest
err := json.NewDecoder(r.Body).Decode(&req)
var kmsKeyRequest KMSKeyRequest
err := json.NewDecoder(r.Body).Decode(&kmsKeyRequest)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
// Run go routine
//ekms.Stuff()
//ekms.Stuff(kmsKeyRequest)
w.WriteHeader(http.StatusNoContent)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment