Skip to content

Commit

Permalink
Merge pull request #9 from xmidt-org/feature/go-module
Browse files Browse the repository at this point in the history
Feature/go module
  • Loading branch information
johnabass authored Aug 28, 2019
2 parents 89752d8 + 2aa9653 commit 3be2537
Show file tree
Hide file tree
Showing 114 changed files with 308 additions and 247 deletions.
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
vendor
pkg

# Ignore build product.
# TODO: We should not be producing build products in this directory
src/themis/themis
themis

bin/
pkg/
lib/
*.out
*.swp
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ branches:
- master

install:
- go get -v github.com/Masterminds/glide

script:
- make build style test codecov
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Time-based claims can be disabled
- Both the issue and claims servers can be disabled
- Integrated health via InvisionApp/go-health
- Converted to a go module: github.com/xmidt-org/themis


[Unreleased]: https://github.com/xmidt-org/themis/compare/v0.0.0...HEAD
6 changes: 3 additions & 3 deletions src/themis/client.go → client.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main

import (
"xhttp/xhttpclient"
"xmetrics"
"xmetrics/xmetricshttp"
"github.com/xmidt-org/themis/xhttp/xhttpclient"
"github.com/xmidt-org/themis/xmetrics"
"github.com/xmidt-org/themis/xmetrics/xmetricshttp"

"github.com/prometheus/client_golang/prometheus"
"go.uber.org/fx"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package configtest

import (
"config"
"github.com/xmidt-org/themis/config"

"github.com/stretchr/testify/mock"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module github.com/xmidt-org/themis

go 1.12

require (
github.com/InVisionApp/go-health v2.1.0+incompatible
github.com/InVisionApp/go-logger v1.0.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/go-kit/kit v0.9.0
github.com/gorilla/mux v1.7.3
github.com/justinas/alice v0.0.0-20171023064455-03f45bd4b7da
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/prometheus/client_golang v1.1.0
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.4.0
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.4.0
go.uber.org/dig v1.7.0 // indirect
go.uber.org/fx v1.9.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0
)
187 changes: 187 additions & 0 deletions go.sum

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/key/handler.go → key/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import (
"context"
"errors"
"net/http"
"xlog"

"github.com/xmidt-org/themis/xlog"

"github.com/go-kit/kit/endpoint"
"github.com/go-kit/kit/log/level"
Expand Down
5 changes: 3 additions & 2 deletions src/key/handler_test.go → key/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (
"net/http"
"net/http/httptest"
"testing"
"xlog"
"xlog/xlogtest"

"github.com/xmidt-org/themis/xlog"
"github.com/xmidt-org/themis/xlog/xlogtest"

"github.com/gorilla/mux"
"github.com/stretchr/testify/assert"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/key/provide_test.go → key/provide_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package key

import (
"random"
"testing"

"github.com/stretchr/testify/assert"
"github.com/xmidt-org/themis/random"
"go.uber.org/fx"
"go.uber.org/fx/fxtest"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions src/themis/main.go → main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
package main

import (
"config"
"fmt"
"key"
"os"
"random"
"strings"
"token"
"xhealth"
"xhttp/xhttpclient"
"xhttp/xhttpserver"
"xlog"
"xlog/xloghttp"
"xmetrics/xmetricshttp"

"github.com/go-kit/kit/log"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/xmidt-org/themis/config"
"github.com/xmidt-org/themis/key"
"github.com/xmidt-org/themis/random"
"github.com/xmidt-org/themis/token"
"github.com/xmidt-org/themis/xhealth"
"github.com/xmidt-org/themis/xhttp/xhttpclient"
"github.com/xmidt-org/themis/xhttp/xhttpserver"
"github.com/xmidt-org/themis/xlog"
"github.com/xmidt-org/themis/xlog/xloghttp"
"github.com/xmidt-org/themis/xmetrics/xmetricshttp"

"github.com/spf13/pflag"
"go.uber.org/fx"
Expand Down
4 changes: 2 additions & 2 deletions src/themis/metrics.go → metrics.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"xmetrics"
"xmetrics/xmetricshttp"
"github.com/xmidt-org/themis/xmetrics"
"github.com/xmidt-org/themis/xmetrics/xmetricshttp"

"github.com/prometheus/client_golang/prometheus"
"go.uber.org/fx"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/themis/routes.go → routes.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
"key"
"token"
"xhealth"
"xhttp/xhttpserver"
"xmetrics"
"xmetrics/xmetricshttp"
"github.com/xmidt-org/themis/key"
"github.com/xmidt-org/themis/token"
"github.com/xmidt-org/themis/xhealth"
"github.com/xmidt-org/themis/xhttp/xhttpserver"
"github.com/xmidt-org/themis/xmetrics"
"github.com/xmidt-org/themis/xmetrics/xmetricshttp"

"github.com/gorilla/mux"
"github.com/justinas/alice"
Expand Down
140 changes: 0 additions & 140 deletions src/glide.lock

This file was deleted.

29 changes: 0 additions & 29 deletions src/glide.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions src/token/claimBuilder.go → token/claimBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"fmt"
"net/http"
"net/url"
"random"
"time"
"xhttp/xhttpclient"

"github.com/xmidt-org/themis/random"
"github.com/xmidt-org/themis/xhttp/xhttpclient"

"github.com/go-kit/kit/endpoint"
kithttp "github.com/go-kit/kit/transport/http"
Expand Down
5 changes: 3 additions & 2 deletions src/token/claimBuilder_test.go → token/claimBuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"io/ioutil"
"net/http"
"net/http/httptest"
"random/randomtest"
"strconv"
"testing"
"time"
"xhttp/xhttpclient"

"github.com/xmidt-org/themis/random/randomtest"
"github.com/xmidt-org/themis/xhttp/xhttpclient"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/token/factory.go → token/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package token
import (
"context"
"fmt"
"key"
"sync/atomic"

"github.com/xmidt-org/themis/key"

jwt "github.com/dgrijalva/jwt-go"
)

Expand Down
5 changes: 3 additions & 2 deletions src/token/factory_test.go → token/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package token
import (
"context"
"crypto/rand"
"key"
"random"
"testing"

"github.com/xmidt-org/themis/key"
"github.com/xmidt-org/themis/random"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3be2537

Please sign in to comment.