Merge branch 'rename-repo' of github.com:apid/apidVerifyApiKey into rename-repo
diff --git a/.travis.yml b/.travis.yml
index 8ba8205..e7c5687 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,4 +12,6 @@
- glide up --strip-vendor
script:
+ - diff -u <(echo -n) <(gofmt -d $(git ls-files | grep '.go$' | grep -v vendor))
+ - go vet $(glide novendor)
- go test -covermode=atomic $(glide novendor)
diff --git a/README.md b/README.md
index e2d3714..492cca8 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# apidVerifyAPIKey
+[](https://travis-ci.org/apid/apidVerifyApiKey) [](https://godoc.org/github.com/apid/apidVerifyApiKey) [](https://goreportcard.com/report/github.com/apid/apidVerifyApiKey)
+
This core plugin for [apid](http://github.com/apid/apid) responds to [apidApigeeSync](https://github.com/apid/apidApigeeSync)
events and publishes an API that allows clients to verify an API key against Apigee.
diff --git a/verifyApiKey/data.go b/verifyApiKey/data.go
index 9ceec7c..8e70faf 100644
--- a/verifyApiKey/data.go
+++ b/verifyApiKey/data.go
@@ -27,7 +27,7 @@
common.DbManager
}
-func (dbc DbManager) getApiKeyDetails(dataWrapper *VerifyApiKeyRequestResponseDataWrapper) error {
+func (dbc *DbManager) getApiKeyDetails(dataWrapper *VerifyApiKeyRequestResponseDataWrapper) error {
db := dbc.Db
@@ -79,7 +79,7 @@
return err
}
-func (dbc DbManager) getApiProductsForApiKey(key, tenantId string) []ApiProductDetails {
+func (dbc *DbManager) getApiProductsForApiKey(key, tenantId string) []ApiProductDetails {
db := dbc.Db
allProducts := []ApiProductDetails{}
diff --git a/verifyApiKey/data_test.go b/verifyApiKey/data_test.go
index b721abb..d81914a 100644
--- a/verifyApiKey/data_test.go
+++ b/verifyApiKey/data_test.go
@@ -48,7 +48,7 @@
})
- It("should get compnay getApiKeyDetails for happy path", func() {
+ It("should get company getApiKeyDetails for happy path", func() {
setupApikeyCompanyTestDb(dbMan.Db)
dataWrapper := VerifyApiKeyRequestResponseDataWrapper{
diff --git a/verifyApiKey/verifyApiKeyUtil_test.go b/verifyApiKey/verifyApiKeyUtil_test.go
index ed53424..1c26982 100644
--- a/verifyApiKey/verifyApiKeyUtil_test.go
+++ b/verifyApiKey/verifyApiKeyUtil_test.go
@@ -43,19 +43,19 @@
var _ = Describe("Validate common.JsonToStringArray", func() {
- It("should tranform simple valid json", func() {
+ It("should transform simple valid json", func() {
array := common.JsonToStringArray("[\"test-1\", \"test-2\"]")
Expect(reflect.DeepEqual(array, []string{"test-1", "test-2"})).Should(BeTrue())
})
- It("should tranform simple single valid json", func() {
+ It("should transform simple single valid json", func() {
array := common.JsonToStringArray("[\"test-1\"]")
Expect(reflect.DeepEqual(array, []string{"test-1"})).Should(BeTrue())
})
- It("should tranform simple fake json", func() {
+ It("should transform simple fake json", func() {
s := common.JsonToStringArray("{test-1,test-2}")
Expect(reflect.DeepEqual(s, []string{"test-1", "test-2"})).Should(BeTrue())
})
- It("should tranform simple single valued fake json", func() {
+ It("should transform simple single valued fake json", func() {
s := common.JsonToStringArray("{test-1}")
Expect(reflect.DeepEqual(s, []string{"test-1"})).Should(BeTrue())
})