Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
quant
Commits
3764bce3
Commit
3764bce3
authored
1 year ago
by
Neil-Jocelyn Schark
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
3f5a04f1
No related branches found
No related tags found
2 merge requests
!11
Big boom integration
,
!6
Draft: Akms ckms api implementation
Pipeline
#181006
passed
1 year ago
Stage: build
Stage: code-quality
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ekms/internal/akmsCkmsServer/akmsCkmsServer.go
+3
-6
3 additions, 6 deletions
ekms/internal/akmsCkmsServer/akmsCkmsServer.go
with
3 additions
and
6 deletions
ekms/internal/akmsCkmsServer/akmsCkmsServer.go
+
3
−
6
View file @
3764bce3
...
@@ -7,13 +7,11 @@ import (
...
@@ -7,13 +7,11 @@ import (
"code.fbi.h-da.de/danet/quant/ekms/internal/kms"
"code.fbi.h-da.de/danet/quant/ekms/internal/kms"
)
)
// Define AKMSReceiverServer.
type
AKMSReceiverServer
struct
{
type
AKMSReceiverServer
struct
{
ekms
*
kms
.
EKMS
ekms
*
kms
.
EKMS
server
*
http
.
Server
server
*
http
.
Server
}
}
// create NewAKMSReceiver.
func
NewAKMSReceiver
(
port
string
,
ekms
*
kms
.
EKMS
)
*
AKMSReceiverServer
{
func
NewAKMSReceiver
(
port
string
,
ekms
*
kms
.
EKMS
)
*
AKMSReceiverServer
{
router
:=
http
.
NewServeMux
()
router
:=
http
.
NewServeMux
()
...
@@ -50,16 +48,15 @@ type KMSKeyRequest struct {
...
@@ -50,16 +48,15 @@ type KMSKeyRequest struct {
}
}
func
ksaReqHandler
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
func
ksaReqHandler
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
// Parse the request body
var
kmsKeyRequest
KMSKeyRequest
var
req
KMSKeyRequest
err
:=
json
.
NewDecoder
(
r
.
Body
)
.
Decode
(
&
kmsKeyRequest
)
err
:=
json
.
NewDecoder
(
r
.
Body
)
.
Decode
(
&
req
)
if
err
!=
nil
{
if
err
!=
nil
{
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusBadRequest
)
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusBadRequest
)
return
return
}
}
// Run go routine
// Run go routine
//ekms.Stuff()
//ekms.Stuff(
kmsKeyRequest
)
w
.
WriteHeader
(
http
.
StatusNoContent
)
w
.
WriteHeader
(
http
.
StatusNoContent
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment