Skip to content

Commit

Permalink
Merge pull request #15 from datawire/lukeshu/reorg
Browse files Browse the repository at this point in the history
Re-organize files
  • Loading branch information
LukeShu authored Jan 16, 2019
2 parents 0df18e9 + 418c84b commit ad500ad
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 228 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions cmd/ambassador-oauth/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package app
import (
"net/http"

"github.com/datawire/apro/cmd/ambassador-oauth/client"
"github.com/gorilla/mux"
"github.com/sirupsen/logrus"
"github.com/urfave/negroni"

"github.com/datawire/apro/cmd/ambassador-oauth/client"
"github.com/datawire/apro/cmd/ambassador-oauth/config"
"github.com/datawire/apro/cmd/ambassador-oauth/controller"
"github.com/datawire/apro/cmd/ambassador-oauth/discovery"
"github.com/datawire/apro/cmd/ambassador-oauth/secret"
"github.com/datawire/apro/handler"
"github.com/datawire/apro/middleware"
"github.com/sirupsen/logrus"
"github.com/urfave/negroni"
"github.com/datawire/apro/lib/handler"
"github.com/datawire/apro/lib/middleware"
)

// App is used to wire up all the cmd application components.
Expand Down
9 changes: 5 additions & 4 deletions cmd/ambassador-oauth/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (
"strings"
"sync/atomic"

"github.com/datawire/apro/cmd/ambassador-oauth/config"
"github.com/datawire/apro/util"
"github.com/datawire/teleproxy/pkg/k8s"
"github.com/gobwas/glob"
ms "github.com/mitchellh/mapstructure"
"github.com/sirupsen/logrus"

ms "github.com/mitchellh/mapstructure"
"github.com/datawire/teleproxy/pkg/k8s"

"github.com/datawire/apro/cmd/ambassador-oauth/config"
"github.com/datawire/apro/lib/util"
)

// Controller is monitors changes in app configuration and policy custom resources.
Expand Down
2 changes: 1 addition & 1 deletion cmd/ambassador-oauth/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"testing"

"github.com/datawire/apro/cmd/ambassador-oauth/app"
"github.com/datawire/apro/testutil"
"github.com/datawire/apro/lib/testutil"
)

var appUT *app.App
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"time"

"github.com/datawire/apro/pkg/longpoll"
"github.com/datawire/apro/lib/longpoll"
)

// PatternInfo represents one Envoy header regex_match
Expand Down
201 changes: 0 additions & 201 deletions intercept/LICENSE

This file was deleted.

File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions handler/authorize.go → lib/handler/authorize.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"net/http"
"time"

"github.com/datawire/apro/cmd/ambassador-oauth/config"
"github.com/datawire/apro/cmd/ambassador-oauth/controller"
"github.com/datawire/apro/cmd/ambassador-oauth/secret"
"github.com/datawire/apro/util"
"github.com/dgrijalva/jwt-go"
"github.com/satori/go.uuid"
"github.com/sirupsen/logrus"

"github.com/datawire/apro/cmd/ambassador-oauth/config"
"github.com/datawire/apro/cmd/ambassador-oauth/controller"
"github.com/datawire/apro/cmd/ambassador-oauth/secret"
"github.com/datawire/apro/lib/util"
)

const (
Expand Down
9 changes: 4 additions & 5 deletions handler/callback.go → lib/handler/callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ import (
"net/http"
"time"

"github.com/dgrijalva/jwt-go"
"github.com/sirupsen/logrus"

"github.com/datawire/apro/cmd/ambassador-oauth/client"
"github.com/datawire/apro/cmd/ambassador-oauth/controller"
"github.com/datawire/apro/cmd/ambassador-oauth/secret"
"github.com/datawire/apro/util"

"github.com/dgrijalva/jwt-go"

"github.com/sirupsen/logrus"
"github.com/datawire/apro/lib/util"
)

const (
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions middleware/domain_check.go → lib/middleware/domain_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"net/http"
"net/url"

"github.com/datawire/apro/cmd/ambassador-oauth/controller"
"github.com/datawire/apro/util"
"github.com/sirupsen/logrus"

"github.com/datawire/apro/cmd/ambassador-oauth/controller"
"github.com/datawire/apro/lib/util"
)

// DomainCheck verifies that a given request has a correspondent application. Applications are
Expand Down
9 changes: 5 additions & 4 deletions middleware/jwt_check.go → lib/middleware/jwt_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"net/http"
"strings"

"github.com/dgrijalva/jwt-go"
"github.com/sirupsen/logrus"

"github.com/datawire/apro/cmd/ambassador-oauth/config"
"github.com/datawire/apro/cmd/ambassador-oauth/controller"
"github.com/datawire/apro/cmd/ambassador-oauth/discovery"
"github.com/datawire/apro/handler"
"github.com/datawire/apro/util"
"github.com/dgrijalva/jwt-go"
"github.com/sirupsen/logrus"
"github.com/datawire/apro/lib/handler"
"github.com/datawire/apro/lib/util"
)

// JWTCheck middleware validates signed tokens when present in the request.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion testutil/servers.go → lib/testutil/servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/datawire/apro/cmd/ambassador-oauth/discovery"
"github.com/datawire/apro/cmd/ambassador-oauth/logger"
"github.com/datawire/apro/cmd/ambassador-oauth/secret"
"github.com/datawire/apro/util"
"github.com/datawire/apro/lib/util"
)

// NewIDP returns an instance of the identity provider server.
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit ad500ad

Please sign in to comment.