From bfe560ee219db51c731380d4ac79a750cc630322 Mon Sep 17 00:00:00 2001 From: Eric Chiang Date: Wed, 10 Aug 2016 22:31:42 -0700 Subject: [PATCH] rename --- Dockerfile | 4 ++-- Documentation/proposals/user-object.md | 2 +- Makefile | 12 ++++++------ cmd/{poke => dex}/config.go | 16 ++++++++-------- cmd/{poke => dex}/config_test.go | 2 +- cmd/{poke => dex}/init.go | 0 cmd/{poke => dex}/poke.go | 2 +- cmd/{poke => dex}/serve.go | 6 +++--- cmd/{poke => dex}/version.go | 2 +- connector/github/github.go | 2 +- connector/ldap/ldap.go | 2 +- connector/mock/connectortest.go | 2 +- connector/oidc/oidc.go | 2 +- examples/k8s/deployment.yaml | 4 ++-- glide.yaml | 2 +- server/handlers.go | 4 ++-- server/oauth2.go | 2 +- server/rotation.go | 2 +- server/server.go | 4 ++-- server/server_test.go | 6 +++--- server/templates.go | 2 +- storage/kubernetes/client.go | 4 ++-- storage/kubernetes/garbage_collection_test.go | 2 +- storage/kubernetes/storage.go | 4 ++-- storage/kubernetes/storage_test.go | 2 +- storage/kubernetes/types.go | 4 ++-- storage/memory/memory.go | 2 +- storage/memory/memory_test.go | 2 +- storage/memory/static_clients_test.go | 2 +- storage/storagetest/storagetest.go | 2 +- 30 files changed, 52 insertions(+), 52 deletions(-) rename cmd/{poke => dex}/config.go (90%) rename cmd/{poke => dex}/config_test.go (95%) rename cmd/{poke => dex}/init.go (100%) rename cmd/{poke => dex}/poke.go (96%) rename cmd/{poke => dex}/serve.go (96%) rename cmd/{poke => dex}/version.go (91%) diff --git a/Dockerfile b/Dockerfile index c7609e27..51094255 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ MAINTAINER Eric Chiang RUN apk add --update ca-certificates -COPY bin/poke /poke +COPY bin/dex /dex -ENTRYPOINT ["/poke"] +ENTRYPOINT ["/dex"] CMD ["version"] diff --git a/Documentation/proposals/user-object.md b/Documentation/proposals/user-object.md index 564e4b65..7ebb8870 100644 --- a/Documentation/proposals/user-object.md +++ b/Documentation/proposals/user-object.md @@ -73,7 +73,7 @@ type RemoteIdentity struct { `UserID` fields will be added to the `AuthRequest`, `AuthCode` and `RefreshToken` structs. When a user logs in successfully through a connector -[here](https://github.com/coreos/poke/blob/95a61454b522edd6643ced36b9d4b9baa8059556/server/handlers.go#L227), +[here](https://github.com/coreos/dex/blob/95a61454b522edd6643ced36b9d4b9baa8059556/server/handlers.go#L227), the server will attempt to either get the user, or create one if none exists with the remote identity. diff --git a/Makefile b/Makefile index 0d565dc1..4e188cca 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ -PROJ=poke +PROJ=dex ORG_PATH=github.com/coreos REPO_PATH=$(ORG_PATH)/$(PROJ) export PATH := $(PWD)/bin:$(PATH) VERSION=$(shell ./scripts/git-version) -DOCKER_REPO=quay.io/ericchiang/poke +DOCKER_REPO=quay.io/ericchiang/dex DOCKER_IMAGE=$(DOCKER_REPO):$(VERSION) export GOBIN=$(PWD)/bin @@ -17,10 +17,10 @@ LD_FLAGS="-w -X $(REPO_PATH)/version.Version=$(VERSION)" GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) -build: bin/poke bin/example-app +build: bin/dex bin/example-app -bin/poke: FORCE - @go install -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/poke +bin/dex: FORCE + @go install -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/dex bin/example-app: FORCE @go install -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/example-app @@ -43,7 +43,7 @@ lint: done .PHONY: docker-build -docker-build: bin/poke +docker-build: bin/dex @docker build -t $(DOCKER_IMAGE) . .PHONY: docker-push diff --git a/cmd/poke/config.go b/cmd/dex/config.go similarity index 90% rename from cmd/poke/config.go rename to cmd/dex/config.go index ed39beb3..1d849980 100644 --- a/cmd/poke/config.go +++ b/cmd/dex/config.go @@ -3,14 +3,14 @@ package main import ( "fmt" - "github.com/coreos/poke/connector" - "github.com/coreos/poke/connector/github" - "github.com/coreos/poke/connector/ldap" - "github.com/coreos/poke/connector/mock" - "github.com/coreos/poke/connector/oidc" - "github.com/coreos/poke/storage" - "github.com/coreos/poke/storage/kubernetes" - "github.com/coreos/poke/storage/memory" + "github.com/coreos/dex/connector" + "github.com/coreos/dex/connector/github" + "github.com/coreos/dex/connector/ldap" + "github.com/coreos/dex/connector/mock" + "github.com/coreos/dex/connector/oidc" + "github.com/coreos/dex/storage" + "github.com/coreos/dex/storage/kubernetes" + "github.com/coreos/dex/storage/memory" ) // Config is the config format for the main application. diff --git a/cmd/poke/config_test.go b/cmd/dex/config_test.go similarity index 95% rename from cmd/poke/config_test.go rename to cmd/dex/config_test.go index f4158bc3..5a70b487 100644 --- a/cmd/poke/config_test.go +++ b/cmd/dex/config_test.go @@ -3,7 +3,7 @@ package main import ( "testing" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/storage" "github.com/kylelemons/godebug/pretty" yaml "gopkg.in/yaml.v2" diff --git a/cmd/poke/init.go b/cmd/dex/init.go similarity index 100% rename from cmd/poke/init.go rename to cmd/dex/init.go diff --git a/cmd/poke/poke.go b/cmd/dex/poke.go similarity index 96% rename from cmd/poke/poke.go rename to cmd/dex/poke.go index d54603ad..be334d92 100644 --- a/cmd/poke/poke.go +++ b/cmd/dex/poke.go @@ -9,7 +9,7 @@ import ( func commandRoot() *cobra.Command { rootCmd := &cobra.Command{ - Use: "poke", + Use: "dex", Run: func(cmd *cobra.Command, args []string) { cmd.Help() os.Exit(2) diff --git a/cmd/poke/serve.go b/cmd/dex/serve.go similarity index 96% rename from cmd/poke/serve.go rename to cmd/dex/serve.go index 24bb4917..932f6c53 100644 --- a/cmd/poke/serve.go +++ b/cmd/dex/serve.go @@ -10,8 +10,8 @@ import ( "github.com/spf13/cobra" yaml "gopkg.in/yaml.v2" - "github.com/coreos/poke/server" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/server" + "github.com/coreos/dex/storage" ) func commandServe() *cobra.Command { @@ -19,7 +19,7 @@ func commandServe() *cobra.Command { Use: "serve [ config file ]", Short: "Connect to the storage and begin serving requests.", Long: ``, - Example: "poke serve c.yaml", + Example: "dex serve c.yaml", RunE: serve, } } diff --git a/cmd/poke/version.go b/cmd/dex/version.go similarity index 91% rename from cmd/poke/version.go rename to cmd/dex/version.go index e7fbfa75..d9f72bc4 100644 --- a/cmd/poke/version.go +++ b/cmd/dex/version.go @@ -4,7 +4,7 @@ import ( "fmt" "runtime" - "github.com/coreos/poke/version" + "github.com/coreos/dex/version" "github.com/spf13/cobra" ) diff --git a/connector/github/github.go b/connector/github/github.go index 2546f16b..b679e0ed 100644 --- a/connector/github/github.go +++ b/connector/github/github.go @@ -13,7 +13,7 @@ import ( "golang.org/x/oauth2" "golang.org/x/oauth2/github" - "github.com/coreos/poke/connector" + "github.com/coreos/dex/connector" ) const baseURL = "https://api.github.com" diff --git a/connector/ldap/ldap.go b/connector/ldap/ldap.go index 746b410c..867f86d6 100644 --- a/connector/ldap/ldap.go +++ b/connector/ldap/ldap.go @@ -7,7 +7,7 @@ import ( "gopkg.in/ldap.v2" - "github.com/coreos/poke/connector" + "github.com/coreos/dex/connector" ) // Config holds the configuration parameters for the LDAP connector. diff --git a/connector/mock/connectortest.go b/connector/mock/connectortest.go index 216681a7..71c97d92 100644 --- a/connector/mock/connectortest.go +++ b/connector/mock/connectortest.go @@ -8,7 +8,7 @@ import ( "net/http" "net/url" - "github.com/coreos/poke/connector" + "github.com/coreos/dex/connector" ) // New returns a mock connector which requires no user interaction. It always returns diff --git a/connector/oidc/oidc.go b/connector/oidc/oidc.go index 17aef1e2..6f19b7d4 100644 --- a/connector/oidc/oidc.go +++ b/connector/oidc/oidc.go @@ -11,7 +11,7 @@ import ( "golang.org/x/net/context" "golang.org/x/oauth2" - "github.com/coreos/poke/connector" + "github.com/coreos/dex/connector" ) // Config holds configuration options for OpenID Connect logins. diff --git a/examples/k8s/deployment.yaml b/examples/k8s/deployment.yaml index c059d59c..ed1338bd 100644 --- a/examples/k8s/deployment.yaml +++ b/examples/k8s/deployment.yaml @@ -12,10 +12,10 @@ spec: app: dex spec: containers: - - image: quay.io/ericchiang/poke + - image: quay.io/ericchiang/dex name: dex command: - - "/poke" + - "/dex" - "serve" - "/dex/config.yaml" env: diff --git a/glide.yaml b/glide.yaml index a10eeae6..a3d4c65e 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,7 +1,7 @@ # NOTE(ericchiang): Create a separate block for each dependency so it's clear # which dependencies require which transitive dependencies. -package: github.com/coreos/poke +package: github.com/coreos/dex import: - package: github.com/spf13/cobra diff --git a/server/handlers.go b/server/handlers.go index b8c848c3..33ff3327 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -15,8 +15,8 @@ import ( "github.com/gorilla/mux" jose "gopkg.in/square/go-jose.v2" - "github.com/coreos/poke/connector" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/connector" + "github.com/coreos/dex/storage" ) func (s *Server) handlePublicKeys(w http.ResponseWriter, r *http.Request) { diff --git a/server/oauth2.go b/server/oauth2.go index ea610cc4..fa92087c 100644 --- a/server/oauth2.go +++ b/server/oauth2.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/storage" ) // TODO(ericchiang): clean this file up and figure out more idiomatic error handling. diff --git a/server/rotation.go b/server/rotation.go index 6b7229bd..37924486 100644 --- a/server/rotation.go +++ b/server/rotation.go @@ -13,7 +13,7 @@ import ( "golang.org/x/net/context" "gopkg.in/square/go-jose.v2" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/storage" ) // rotationStrategy describes a strategy for generating cryptographic keys, how diff --git a/server/server.go b/server/server.go index 1bec7b69..3c8c2e7c 100644 --- a/server/server.go +++ b/server/server.go @@ -11,8 +11,8 @@ import ( "github.com/gorilla/mux" - "github.com/coreos/poke/connector" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/connector" + "github.com/coreos/dex/storage" ) // Connector is a connector with metadata. diff --git a/server/server_test.go b/server/server_test.go index a542421b..9b19332e 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -14,9 +14,9 @@ import ( "golang.org/x/net/context" "golang.org/x/oauth2" - "github.com/coreos/poke/connector/mock" - "github.com/coreos/poke/storage" - "github.com/coreos/poke/storage/memory" + "github.com/coreos/dex/connector/mock" + "github.com/coreos/dex/storage" + "github.com/coreos/dex/storage/memory" ) func mustLoad(s string) *rsa.PrivateKey { diff --git a/server/templates.go b/server/templates.go index 9bfc71f6..7bc64144 100644 --- a/server/templates.go +++ b/server/templates.go @@ -5,7 +5,7 @@ import ( "net/http" "text/template" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/storage" ) type connectorInfo struct { diff --git a/storage/kubernetes/client.go b/storage/kubernetes/client.go index 1ce67e27..f6f97f17 100644 --- a/storage/kubernetes/client.go +++ b/storage/kubernetes/client.go @@ -22,8 +22,8 @@ import ( "golang.org/x/net/context" yaml "gopkg.in/yaml.v2" - "github.com/coreos/poke/storage" - "github.com/coreos/poke/storage/kubernetes/k8sapi" + "github.com/coreos/dex/storage" + "github.com/coreos/dex/storage/kubernetes/k8sapi" ) type client struct { diff --git a/storage/kubernetes/garbage_collection_test.go b/storage/kubernetes/garbage_collection_test.go index 139dbe3e..bb725683 100644 --- a/storage/kubernetes/garbage_collection_test.go +++ b/storage/kubernetes/garbage_collection_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/storage" ) func muster(t *testing.T) func(err error) { diff --git a/storage/kubernetes/storage.go b/storage/kubernetes/storage.go index 8cadb3f3..bfb48855 100644 --- a/storage/kubernetes/storage.go +++ b/storage/kubernetes/storage.go @@ -10,8 +10,8 @@ import ( homedir "github.com/mitchellh/go-homedir" "golang.org/x/net/context" - "github.com/coreos/poke/storage" - "github.com/coreos/poke/storage/kubernetes/k8sapi" + "github.com/coreos/dex/storage" + "github.com/coreos/dex/storage/kubernetes/k8sapi" ) const ( diff --git a/storage/kubernetes/storage_test.go b/storage/kubernetes/storage_test.go index fe19a30f..7c4ef2d3 100644 --- a/storage/kubernetes/storage_test.go +++ b/storage/kubernetes/storage_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/coreos/poke/storage/storagetest" + "github.com/coreos/dex/storage/storagetest" ) func TestLoadClient(t *testing.T) { diff --git a/storage/kubernetes/types.go b/storage/kubernetes/types.go index 5e243ddc..1440057d 100644 --- a/storage/kubernetes/types.go +++ b/storage/kubernetes/types.go @@ -5,8 +5,8 @@ import ( jose "gopkg.in/square/go-jose.v2" - "github.com/coreos/poke/storage" - "github.com/coreos/poke/storage/kubernetes/k8sapi" + "github.com/coreos/dex/storage" + "github.com/coreos/dex/storage/kubernetes/k8sapi" ) // There will only ever be a single keys resource. Maintain this by setting a diff --git a/storage/memory/memory.go b/storage/memory/memory.go index d4bb1bcd..d178f20b 100644 --- a/storage/memory/memory.go +++ b/storage/memory/memory.go @@ -5,7 +5,7 @@ import ( "errors" "sync" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/storage" ) // New returns an in memory storage. diff --git a/storage/memory/memory_test.go b/storage/memory/memory_test.go index 055b5347..1ec09381 100644 --- a/storage/memory/memory_test.go +++ b/storage/memory/memory_test.go @@ -3,7 +3,7 @@ package memory import ( "testing" - "github.com/coreos/poke/storage/storagetest" + "github.com/coreos/dex/storage/storagetest" ) func TestStorage(t *testing.T) { diff --git a/storage/memory/static_clients_test.go b/storage/memory/static_clients_test.go index e34b070c..f85cad16 100644 --- a/storage/memory/static_clients_test.go +++ b/storage/memory/static_clients_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/storage" ) func TestStaticClients(t *testing.T) { diff --git a/storage/storagetest/storagetest.go b/storage/storagetest/storagetest.go index f3c55124..c4f8f96e 100644 --- a/storage/storagetest/storagetest.go +++ b/storage/storagetest/storagetest.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/coreos/poke/storage" + "github.com/coreos/dex/storage" ) var neverExpire = time.Now().Add(time.Hour * 24 * 365 * 100)