-
Notifications
You must be signed in to change notification settings - Fork 6
Rename to citadel #23
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package main | ||
|
||
import ( | ||
"log" | ||
|
||
"github.com/enj/citadel/pkg/cmd/citadel" | ||
) | ||
|
||
func main() { | ||
if err := citadel.Execute(); err != nil { | ||
log.Fatal(err) | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package api | ||
|
||
const ( | ||
Name = "citadel" | ||
ShortName = "c5l" | ||
Version = "v0.0.2" // TODO embed git sha on build | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,22 +3,19 @@ package kms | |
import ( | ||
"fmt" | ||
|
||
"github.com/enj/kms/api/v1beta1" | ||
"github.com/enj/kms/pkg/encryption" | ||
"github.com/enj/citadel/api/v1beta1" | ||
"github.com/enj/citadel/pkg/api" | ||
"github.com/enj/citadel/pkg/encryption" | ||
|
||
"golang.org/x/net/context" | ||
) | ||
|
||
const ( | ||
version = "v1beta1" | ||
runtimeName = "kms_cmd" | ||
runtimeVersion = "0.0.1" // TODO embed git sha on build | ||
) | ||
const kmsAPIVersion = "v1beta1" | ||
|
||
var apiVersionResponse = &v1beta1.VersionResponse{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume this is what you are renaming later? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as its still There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually plan to make a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 for the rename, then. 😄 |
||
Version: version, | ||
RuntimeName: runtimeName, | ||
RuntimeVersion: runtimeVersion, | ||
Version: kmsAPIVersion, | ||
RuntimeName: api.Name, | ||
RuntimeVersion: api.Version, | ||
} | ||
|
||
func NewKeyManagementService(service encryption.EncryptionService) v1beta1.KeyManagementServiceServer { | ||
|
@@ -67,8 +64,8 @@ func (k *kms) Encrypt(ctx context.Context, req *v1beta1.EncryptRequest) (*v1beta | |
} | ||
|
||
func checkVersion(v string) error { | ||
if v != version { | ||
return fmt.Errorf("unsupported version %q, use %q", v, version) | ||
if v != kmsAPIVersion { | ||
return fmt.Errorf("unsupported version %q, use %q", v, kmsAPIVersion) | ||
} | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the
c5l
abbreviation.citadel
isn't that long.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used it as the short name in the prefix code (to mimic kube), so I wanted to actually use it so people would know what it was referring to.
I am not really worried about the length in the docs, it is more of "google will find it"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't like it, but if you want to mimic kube, I can accept that.