diff --git a/.gitignore b/.gitignore index bbec59a..3361707 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor +.glide .realize app diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json deleted file mode 100644 index 90e3f7e..0000000 --- a/Godeps/Godeps.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "ImportPath": "vault", - "GoVersion": "go1.7", - "GodepVersion": "v79", - "Deps": [ - { - "ImportPath": "github.com/gin-gonic/gin/binding", - "Comment": "v1.1.4", - "Rev": "e2212d40c62a98b388a5eb48ecbdcf88534688ba" - }, - { - "ImportPath": "github.com/gin-gonic/gin/render", - "Comment": "v1.1.4", - "Rev": "e2212d40c62a98b388a5eb48ecbdcf88534688ba" - }, - { - "ImportPath": "github.com/golang/protobuf/proto", - "Rev": "c9c7427a2a70d2eb3bafa0ab2dc163e45f143317" - }, - { - "ImportPath": "github.com/manucorporat/sse", - "Rev": "ee05b128a739a0fb76c7ebd3ae4810c1de808d6d" - }, - { - "ImportPath": "github.com/mattn/go-isatty", - "Comment": "v0.0.1-32-gfc9e8d8", - "Rev": "fc9e8d8ef48496124e79ae0df75490096eccf6fe" - }, - { - "ImportPath": "golang.org/x/net/context", - "Rev": "6c23252515492caf9b228a9d5cabcdbde29f7f82" - }, - { - "ImportPath": "golang.org/x/sys/unix", - "Rev": "afadfcc7779c1f4db0f6f6438afcb108d9c9c7cd" - }, - { - "ImportPath": "gopkg.in/gin-gonic/gin.v1", - "Comment": "v1.1.4", - "Rev": "e2212d40c62a98b388a5eb48ecbdcf88534688ba" - }, - { - "ImportPath": "gopkg.in/go-playground/validator.v8", - "Comment": "v8.18.1", - "Rev": "5f57d2222ad794d0dffb07e664ea05e2ee07d60c" - }, - { - "ImportPath": "gopkg.in/yaml.v2", - "Rev": "a3f3340b5840cee44f372bddb5880fcbc419b46a" - } - ] -} diff --git a/Godeps/Readme b/Godeps/Readme deleted file mode 100644 index 4cdaa53..0000000 --- a/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information. diff --git a/Makefile b/Makefile index 89ce60d..67a4bcb 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ CONTAINER_PORT=-p 7007:7014 ENV=-e VAULT_APP_URL=vault.app build: - docker run --rm -v ${PWD}:/go/src/app -w /go/src/app -e GOOS=linux -e GOARCH=386 sipsynergy/go-builder /bin/sh -c "godep get && godep go build" + docker run --rm -v ${PWD}:/go/src/app -w /go/src/app lrodham/golang-glide /bin/sh -c "glide install && go build" docker build -t ${BINARY}:${VERSION} . start: docker run -e ${ENV} -d ${CONTAINER_PORT} --name ${BINARY} ${BINARY}:${VERSION} diff --git a/glide.lock b/glide.lock new file mode 100644 index 0000000..5361140 --- /dev/null +++ b/glide.lock @@ -0,0 +1,31 @@ +hash: 9f87a5b65287decae405d7f9a2d9fb61ee4c7ae46a212b18dbf73fce76bd0a4f +updated: 2017-04-10T21:59:27.344404573+01:00 +imports: +- name: github.com/gin-gonic/gin + version: e2212d40c62a98b388a5eb48ecbdcf88534688ba + subpackages: + - binding + - render +- name: github.com/golang/protobuf + version: 2402d76f3d41f928c7902a765dfc872356dd3aad + subpackages: + - proto +- name: github.com/manucorporat/sse + version: ee05b128a739a0fb76c7ebd3ae4810c1de808d6d +- name: github.com/mattn/go-isatty + version: fc9e8d8ef48496124e79ae0df75490096eccf6fe +- name: golang.org/x/net + version: f315505cf3349909cdf013ea56690da34e96a451 + subpackages: + - context +- name: golang.org/x/sys + version: f3918c30c5c2cb527c0b071a27c35120a6c0719a + subpackages: + - unix +- name: gopkg.in/gin-gonic/gin.v1 + version: e2212d40c62a98b388a5eb48ecbdcf88534688ba +- name: gopkg.in/go-playground/validator.v8 + version: c193cecd124b5cc722d7ee5538e945bdb3348435 +- name: gopkg.in/yaml.v2 + version: cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b +testImports: [] diff --git a/glide.yaml b/glide.yaml new file mode 100644 index 0000000..c35e215 --- /dev/null +++ b/glide.yaml @@ -0,0 +1,4 @@ +package: vault +import: +- package: gopkg.in/gin-gonic/gin.v1 + version: ^1.1.4 diff --git a/main.go b/main.go index 9091b54..2f4a613 100644 --- a/main.go +++ b/main.go @@ -16,12 +16,14 @@ import ( "gopkg.in/gin-gonic/gin.v1" ) +// Item holds the data. type Item struct { Data string `json:"data"` Expiry time.Time `json:"expiryData"` TTL int32 `json:"ttl"` } +// Vault holds the vault data and key. type Vault struct { Vault string `json:"vault"` Key string `json:"key"`