From 0f08b6961af9103f9273b116230a575634baec5f Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 10 Feb 2015 17:25:40 -0800 Subject: [PATCH 1/7] Move registry package into handler package The goal is to free up the distribution/registry package to include common registry types. This moves the webapp definitions out of the way to allow for this change in the future. Signed-off-by: Stephen J Day --- cmd/registry/main.go | 10 +++++----- registry/doc.go | 3 +++ registry/{ => handlers}/api_test.go | 2 +- registry/{ => handlers}/app.go | 2 +- registry/{ => handlers}/app_test.go | 2 +- registry/{ => handlers}/basicauth.go | 2 +- registry/{ => handlers}/basicauth_prego14.go | 2 +- registry/{ => handlers}/context.go | 2 +- registry/{ => handlers}/helpers.go | 2 +- registry/{ => handlers}/hmac.go | 2 +- registry/{ => handlers}/hmac_test.go | 2 +- registry/{ => handlers}/images.go | 2 +- registry/{ => handlers}/layer.go | 2 +- registry/{ => handlers}/layerupload.go | 2 +- registry/{ => handlers}/tags.go | 2 +- 15 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 registry/doc.go rename registry/{ => handlers}/api_test.go (99%) rename registry/{ => handlers}/app.go (99%) rename registry/{ => handlers}/app_test.go (99%) rename registry/{ => handlers}/basicauth.go (88%) rename registry/{ => handlers}/basicauth_prego14.go (98%) rename registry/{ => handlers}/context.go (99%) rename registry/{ => handlers}/helpers.go (97%) rename registry/{ => handlers}/hmac.go (99%) rename registry/{ => handlers}/hmac_test.go (99%) rename registry/{ => handlers}/images.go (99%) rename registry/{ => handlers}/layer.go (99%) rename registry/{ => handlers}/layerupload.go (99%) rename registry/{ => handlers}/tags.go (98%) diff --git a/cmd/registry/main.go b/cmd/registry/main.go index 0ed8fcd280..1c39961771 100644 --- a/cmd/registry/main.go +++ b/cmd/registry/main.go @@ -14,12 +14,12 @@ import ( _ "github.com/docker/distribution/auth/token" "github.com/docker/distribution/configuration" ctxu "github.com/docker/distribution/context" - "github.com/docker/distribution/registry" + "github.com/docker/distribution/registry/handlers" _ "github.com/docker/distribution/storagedriver/filesystem" _ "github.com/docker/distribution/storagedriver/inmemory" _ "github.com/docker/distribution/storagedriver/s3" "github.com/docker/distribution/version" - "github.com/gorilla/handlers" + gorhandlers "github.com/gorilla/handlers" "github.com/yvasiyarov/gorelic" "golang.org/x/net/context" ) @@ -50,9 +50,9 @@ func main() { ctx = context.WithValue(ctx, "version", version.Version) ctx = ctxu.WithLogger(ctx, ctxu.GetLogger(ctx, "version")) - app := registry.NewApp(ctx, *config) + app := handlers.NewApp(ctx, *config) handler := configureReporting(app) - handler = handlers.CombinedLoggingHandler(os.Stdout, handler) + handler = gorhandlers.CombinedLoggingHandler(os.Stdout, handler) if config.HTTP.Debug.Addr != "" { go debugServer(config.HTTP.Debug.Addr) @@ -118,7 +118,7 @@ func logLevel(level configuration.Loglevel) log.Level { return l } -func configureReporting(app *registry.App) http.Handler { +func configureReporting(app *handlers.App) http.Handler { var handler http.Handler = app if app.Config.Reporting.Bugsnag.APIKey != "" { diff --git a/registry/doc.go b/registry/doc.go new file mode 100644 index 0000000000..5049dae35b --- /dev/null +++ b/registry/doc.go @@ -0,0 +1,3 @@ +// Package registry is a placeholder package for registry interface +// destinations and utilities. +package registry diff --git a/registry/api_test.go b/registry/handlers/api_test.go similarity index 99% rename from registry/api_test.go rename to registry/handlers/api_test.go index 5e3bd72c65..1d1173a9a0 100644 --- a/registry/api_test.go +++ b/registry/handlers/api_test.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "bytes" diff --git a/registry/app.go b/registry/handlers/app.go similarity index 99% rename from registry/app.go rename to registry/handlers/app.go index 817373f25a..e49144e2fa 100644 --- a/registry/app.go +++ b/registry/handlers/app.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "fmt" diff --git a/registry/app_test.go b/registry/handlers/app_test.go similarity index 99% rename from registry/app_test.go rename to registry/handlers/app_test.go index 9b106575d6..927f40a4af 100644 --- a/registry/app_test.go +++ b/registry/handlers/app_test.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "encoding/json" diff --git a/registry/basicauth.go b/registry/handlers/basicauth.go similarity index 88% rename from registry/basicauth.go rename to registry/handlers/basicauth.go index 55794ee323..8727a3cd15 100644 --- a/registry/basicauth.go +++ b/registry/handlers/basicauth.go @@ -1,6 +1,6 @@ // +build go1.4 -package registry +package handlers import ( "net/http" diff --git a/registry/basicauth_prego14.go b/registry/handlers/basicauth_prego14.go similarity index 98% rename from registry/basicauth_prego14.go rename to registry/handlers/basicauth_prego14.go index dc563135be..6cf10a25e9 100644 --- a/registry/basicauth_prego14.go +++ b/registry/handlers/basicauth_prego14.go @@ -1,6 +1,6 @@ // +build !go1.4 -package registry +package handlers import ( "encoding/base64" diff --git a/registry/context.go b/registry/handlers/context.go similarity index 99% rename from registry/context.go rename to registry/handlers/context.go index 7c4dbb0233..8f277595cb 100644 --- a/registry/context.go +++ b/registry/handlers/context.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "fmt" diff --git a/registry/helpers.go b/registry/handlers/helpers.go similarity index 97% rename from registry/helpers.go rename to registry/handlers/helpers.go index 6bcb4ae82b..f2879137be 100644 --- a/registry/helpers.go +++ b/registry/handlers/helpers.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "encoding/json" diff --git a/registry/hmac.go b/registry/handlers/hmac.go similarity index 99% rename from registry/hmac.go rename to registry/handlers/hmac.go index d24700875f..e17ececa28 100644 --- a/registry/hmac.go +++ b/registry/handlers/hmac.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "crypto/hmac" diff --git a/registry/hmac_test.go b/registry/handlers/hmac_test.go similarity index 99% rename from registry/hmac_test.go rename to registry/handlers/hmac_test.go index 5ad60f61d0..cce2cd492e 100644 --- a/registry/hmac_test.go +++ b/registry/handlers/hmac_test.go @@ -1,4 +1,4 @@ -package registry +package handlers import "testing" diff --git a/registry/images.go b/registry/handlers/images.go similarity index 99% rename from registry/images.go rename to registry/handlers/images.go index c44b0b210a..c26a2239a4 100644 --- a/registry/images.go +++ b/registry/handlers/images.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "encoding/json" diff --git a/registry/layer.go b/registry/handlers/layer.go similarity index 99% rename from registry/layer.go rename to registry/handlers/layer.go index 10569465cc..31d24b865c 100644 --- a/registry/layer.go +++ b/registry/handlers/layer.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "net/http" diff --git a/registry/layerupload.go b/registry/handlers/layerupload.go similarity index 99% rename from registry/layerupload.go rename to registry/handlers/layerupload.go index f30bb3aa63..a15e274a73 100644 --- a/registry/layerupload.go +++ b/registry/handlers/layerupload.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "fmt" diff --git a/registry/tags.go b/registry/handlers/tags.go similarity index 98% rename from registry/tags.go rename to registry/handlers/tags.go index 1f745c6a90..65ffacfc92 100644 --- a/registry/tags.go +++ b/registry/handlers/tags.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "encoding/json" From e4b811f489a2e76482f2c8302402b3367668de7c Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 10 Feb 2015 17:32:22 -0800 Subject: [PATCH 2/7] Move registry api definitions under registry package Signed-off-by: Stephen J Day --- client/client.go | 2 +- cmd/registry-api-descriptor-template/main.go | 2 +- {api => registry/api}/v2/descriptors.go | 0 {api => registry/api}/v2/doc.go | 0 {api => registry/api}/v2/errors.go | 0 {api => registry/api}/v2/errors_test.go | 0 {api => registry/api}/v2/names.go | 0 {api => registry/api}/v2/names_test.go | 0 {api => registry/api}/v2/routes.go | 0 {api => registry/api}/v2/routes_test.go | 0 {api => registry/api}/v2/urls.go | 0 {api => registry/api}/v2/urls_test.go | 0 registry/handlers/api_test.go | 2 +- registry/handlers/app.go | 2 +- registry/handlers/app_test.go | 2 +- registry/handlers/context.go | 2 +- registry/handlers/images.go | 2 +- registry/handlers/layer.go | 2 +- registry/handlers/layerupload.go | 2 +- registry/handlers/tags.go | 2 +- 20 files changed, 10 insertions(+), 10 deletions(-) rename {api => registry/api}/v2/descriptors.go (100%) rename {api => registry/api}/v2/doc.go (100%) rename {api => registry/api}/v2/errors.go (100%) rename {api => registry/api}/v2/errors_test.go (100%) rename {api => registry/api}/v2/names.go (100%) rename {api => registry/api}/v2/names_test.go (100%) rename {api => registry/api}/v2/routes.go (100%) rename {api => registry/api}/v2/routes_test.go (100%) rename {api => registry/api}/v2/urls.go (100%) rename {api => registry/api}/v2/urls_test.go (100%) diff --git a/client/client.go b/client/client.go index 6495da9650..c697e01ce9 100644 --- a/client/client.go +++ b/client/client.go @@ -9,7 +9,7 @@ import ( "regexp" "strconv" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" ) diff --git a/cmd/registry-api-descriptor-template/main.go b/cmd/registry-api-descriptor-template/main.go index f6f209253e..5118d330c1 100644 --- a/cmd/registry-api-descriptor-template/main.go +++ b/cmd/registry-api-descriptor-template/main.go @@ -20,7 +20,7 @@ import ( "regexp" "text/template" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" ) var spaceRegex = regexp.MustCompile(`\n\s*`) diff --git a/api/v2/descriptors.go b/registry/api/v2/descriptors.go similarity index 100% rename from api/v2/descriptors.go rename to registry/api/v2/descriptors.go diff --git a/api/v2/doc.go b/registry/api/v2/doc.go similarity index 100% rename from api/v2/doc.go rename to registry/api/v2/doc.go diff --git a/api/v2/errors.go b/registry/api/v2/errors.go similarity index 100% rename from api/v2/errors.go rename to registry/api/v2/errors.go diff --git a/api/v2/errors_test.go b/registry/api/v2/errors_test.go similarity index 100% rename from api/v2/errors_test.go rename to registry/api/v2/errors_test.go diff --git a/api/v2/names.go b/registry/api/v2/names.go similarity index 100% rename from api/v2/names.go rename to registry/api/v2/names.go diff --git a/api/v2/names_test.go b/registry/api/v2/names_test.go similarity index 100% rename from api/v2/names_test.go rename to registry/api/v2/names_test.go diff --git a/api/v2/routes.go b/registry/api/v2/routes.go similarity index 100% rename from api/v2/routes.go rename to registry/api/v2/routes.go diff --git a/api/v2/routes_test.go b/registry/api/v2/routes_test.go similarity index 100% rename from api/v2/routes_test.go rename to registry/api/v2/routes_test.go diff --git a/api/v2/urls.go b/registry/api/v2/urls.go similarity index 100% rename from api/v2/urls.go rename to registry/api/v2/urls.go diff --git a/api/v2/urls_test.go b/registry/api/v2/urls_test.go similarity index 100% rename from api/v2/urls_test.go rename to registry/api/v2/urls_test.go diff --git a/registry/handlers/api_test.go b/registry/handlers/api_test.go index 1d1173a9a0..08d0cf9724 100644 --- a/registry/handlers/api_test.go +++ b/registry/handlers/api_test.go @@ -14,7 +14,7 @@ import ( "reflect" "testing" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/configuration" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" diff --git a/registry/handlers/app.go b/registry/handlers/app.go index e49144e2fa..876c69b462 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -7,7 +7,7 @@ import ( "os" "code.google.com/p/go-uuid/uuid" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/auth" "github.com/docker/distribution/configuration" ctxu "github.com/docker/distribution/context" diff --git a/registry/handlers/app_test.go b/registry/handlers/app_test.go index 927f40a4af..249c381b40 100644 --- a/registry/handlers/app_test.go +++ b/registry/handlers/app_test.go @@ -7,7 +7,7 @@ import ( "net/url" "testing" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" _ "github.com/docker/distribution/auth/silly" "github.com/docker/distribution/configuration" "github.com/docker/distribution/storage" diff --git a/registry/handlers/context.go b/registry/handlers/context.go index 8f277595cb..c940d8f4b6 100644 --- a/registry/handlers/context.go +++ b/registry/handlers/context.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" "github.com/docker/distribution/storage" diff --git a/registry/handlers/images.go b/registry/handlers/images.go index c26a2239a4..9c2dfa437a 100644 --- a/registry/handlers/images.go +++ b/registry/handlers/images.go @@ -5,7 +5,7 @@ import ( "fmt" "net/http" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" diff --git a/registry/handlers/layer.go b/registry/handlers/layer.go index 31d24b865c..73641ddeba 100644 --- a/registry/handlers/layer.go +++ b/registry/handlers/layer.go @@ -3,7 +3,7 @@ package handlers import ( "net/http" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" "github.com/docker/distribution/storage" diff --git a/registry/handlers/layerupload.go b/registry/handlers/layerupload.go index a15e274a73..190cf86bf2 100644 --- a/registry/handlers/layerupload.go +++ b/registry/handlers/layerupload.go @@ -7,7 +7,7 @@ import ( "net/url" "os" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" "github.com/docker/distribution/storage" diff --git a/registry/handlers/tags.go b/registry/handlers/tags.go index 65ffacfc92..1e8e43d55c 100644 --- a/registry/handlers/tags.go +++ b/registry/handlers/tags.go @@ -4,7 +4,7 @@ import ( "encoding/json" "net/http" - "github.com/docker/distribution/api/v2" + "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/storage" "github.com/gorilla/handlers" ) From 0371f648bf6875750f630361e4be1e50717b750b Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 10 Feb 2015 17:34:04 -0800 Subject: [PATCH 3/7] Move auth package under registry package Signed-off-by: Stephen J Day --- cmd/registry/main.go | 4 ++-- {auth => registry/auth}/auth.go | 0 {auth => registry/auth}/silly/access.go | 2 +- {auth => registry/auth}/silly/access_test.go | 2 +- {auth => registry/auth}/token/accesscontroller.go | 2 +- {auth => registry/auth}/token/stringset.go | 0 {auth => registry/auth}/token/token.go | 2 +- {auth => registry/auth}/token/token_test.go | 2 +- {auth => registry/auth}/token/util.go | 0 registry/handlers/app.go | 2 +- registry/handlers/app_test.go | 2 +- 11 files changed, 9 insertions(+), 9 deletions(-) rename {auth => registry/auth}/auth.go (100%) rename {auth => registry/auth}/silly/access.go (98%) rename {auth => registry/auth}/silly/access_test.go (97%) rename {auth => registry/auth}/token/accesscontroller.go (99%) rename {auth => registry/auth}/token/stringset.go (100%) rename {auth => registry/auth}/token/token.go (99%) rename {auth => registry/auth}/token/token_test.go (99%) rename {auth => registry/auth}/token/util.go (100%) diff --git a/cmd/registry/main.go b/cmd/registry/main.go index 1c39961771..535b9cde0f 100644 --- a/cmd/registry/main.go +++ b/cmd/registry/main.go @@ -10,8 +10,8 @@ import ( log "github.com/Sirupsen/logrus" "github.com/bugsnag/bugsnag-go" - _ "github.com/docker/distribution/auth/silly" - _ "github.com/docker/distribution/auth/token" + _ "github.com/docker/distribution/registry/auth/silly" + _ "github.com/docker/distribution/registry/auth/token" "github.com/docker/distribution/configuration" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/registry/handlers" diff --git a/auth/auth.go b/registry/auth/auth.go similarity index 100% rename from auth/auth.go rename to registry/auth/auth.go diff --git a/auth/silly/access.go b/registry/auth/silly/access.go similarity index 98% rename from auth/silly/access.go rename to registry/auth/silly/access.go index c3adba804d..7d3a4d40d6 100644 --- a/auth/silly/access.go +++ b/registry/auth/silly/access.go @@ -12,7 +12,7 @@ import ( "net/http" "strings" - "github.com/docker/distribution/auth" + "github.com/docker/distribution/registry/auth" ctxu "github.com/docker/distribution/context" "golang.org/x/net/context" ) diff --git a/auth/silly/access_test.go b/registry/auth/silly/access_test.go similarity index 97% rename from auth/silly/access_test.go rename to registry/auth/silly/access_test.go index 44d66a4d7d..d579e87803 100644 --- a/auth/silly/access_test.go +++ b/registry/auth/silly/access_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/docker/distribution/auth" + "github.com/docker/distribution/registry/auth" "golang.org/x/net/context" ) diff --git a/auth/token/accesscontroller.go b/registry/auth/token/accesscontroller.go similarity index 99% rename from auth/token/accesscontroller.go rename to registry/auth/token/accesscontroller.go index 2f1e3d6d77..61b275a701 100644 --- a/auth/token/accesscontroller.go +++ b/registry/auth/token/accesscontroller.go @@ -11,7 +11,7 @@ import ( "os" "strings" - "github.com/docker/distribution/auth" + "github.com/docker/distribution/registry/auth" ctxu "github.com/docker/distribution/context" "github.com/docker/libtrust" "golang.org/x/net/context" diff --git a/auth/token/stringset.go b/registry/auth/token/stringset.go similarity index 100% rename from auth/token/stringset.go rename to registry/auth/token/stringset.go diff --git a/auth/token/token.go b/registry/auth/token/token.go similarity index 99% rename from auth/token/token.go rename to registry/auth/token/token.go index 6d67374eda..166816eeaa 100644 --- a/auth/token/token.go +++ b/registry/auth/token/token.go @@ -13,7 +13,7 @@ import ( log "github.com/Sirupsen/logrus" "github.com/docker/libtrust" - "github.com/docker/distribution/auth" + "github.com/docker/distribution/registry/auth" ) const ( diff --git a/auth/token/token_test.go b/registry/auth/token/token_test.go similarity index 99% rename from auth/token/token_test.go rename to registry/auth/token/token_test.go index ab9fb896b3..791eb2140a 100644 --- a/auth/token/token_test.go +++ b/registry/auth/token/token_test.go @@ -15,7 +15,7 @@ import ( "testing" "time" - "github.com/docker/distribution/auth" + "github.com/docker/distribution/registry/auth" "github.com/docker/libtrust" "golang.org/x/net/context" ) diff --git a/auth/token/util.go b/registry/auth/token/util.go similarity index 100% rename from auth/token/util.go rename to registry/auth/token/util.go diff --git a/registry/handlers/app.go b/registry/handlers/app.go index 876c69b462..5f433e95da 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -8,7 +8,7 @@ import ( "code.google.com/p/go-uuid/uuid" "github.com/docker/distribution/registry/api/v2" - "github.com/docker/distribution/auth" + "github.com/docker/distribution/registry/auth" "github.com/docker/distribution/configuration" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/storage" diff --git a/registry/handlers/app_test.go b/registry/handlers/app_test.go index 249c381b40..8da285a38d 100644 --- a/registry/handlers/app_test.go +++ b/registry/handlers/app_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/docker/distribution/registry/api/v2" - _ "github.com/docker/distribution/auth/silly" + _ "github.com/docker/distribution/registry/auth/silly" "github.com/docker/distribution/configuration" "github.com/docker/distribution/storage" "github.com/docker/distribution/storagedriver/inmemory" From 2832ec7f5c4f42dcfd515ba129df60492da20b53 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 10 Feb 2015 17:35:30 -0800 Subject: [PATCH 4/7] Move client package under registry package Signed-off-by: Stephen J Day --- {client => registry/client}/client.go | 0 {client => registry/client}/client_test.go | 0 {client => registry/client}/errors.go | 0 {client => registry/client}/objectstore.go | 0 {client => registry/client}/pull.go | 0 {client => registry/client}/push.go | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {client => registry/client}/client.go (100%) rename {client => registry/client}/client_test.go (100%) rename {client => registry/client}/errors.go (100%) rename {client => registry/client}/objectstore.go (100%) rename {client => registry/client}/pull.go (100%) rename {client => registry/client}/push.go (100%) diff --git a/client/client.go b/registry/client/client.go similarity index 100% rename from client/client.go rename to registry/client/client.go diff --git a/client/client_test.go b/registry/client/client_test.go similarity index 100% rename from client/client_test.go rename to registry/client/client_test.go diff --git a/client/errors.go b/registry/client/errors.go similarity index 100% rename from client/errors.go rename to registry/client/errors.go diff --git a/client/objectstore.go b/registry/client/objectstore.go similarity index 100% rename from client/objectstore.go rename to registry/client/objectstore.go diff --git a/client/pull.go b/registry/client/pull.go similarity index 100% rename from client/pull.go rename to registry/client/pull.go diff --git a/client/push.go b/registry/client/push.go similarity index 100% rename from client/push.go rename to registry/client/push.go From 3468fbd4a8da8ddbea94b77042c1cf3a6e6a497d Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 10 Feb 2015 17:41:09 -0800 Subject: [PATCH 5/7] Move storage package under registry package Signed-off-by: Stephen J Day --- registry/handlers/app.go | 4 ++-- registry/handlers/app_test.go | 2 +- registry/handlers/context.go | 2 +- registry/handlers/images.go | 2 +- registry/handlers/layer.go | 2 +- registry/handlers/layerupload.go | 2 +- registry/handlers/tags.go | 2 +- {storage => registry/storage}/blobstore.go | 0 {storage => registry/storage}/cloudfrontlayerhandler.go | 0 {storage => registry/storage}/delegatelayerhandler.go | 0 {storage => registry/storage}/doc.go | 0 {storage => registry/storage}/filereader.go | 0 {storage => registry/storage}/filereader_test.go | 0 {storage => registry/storage}/filewriter.go | 0 {storage => registry/storage}/filewriter_test.go | 0 {storage => registry/storage}/layer.go | 0 {storage => registry/storage}/layer_test.go | 0 {storage => registry/storage}/layerhandler.go | 0 {storage => registry/storage}/layerreader.go | 0 {storage => registry/storage}/layerstore.go | 0 {storage => registry/storage}/layerupload.go | 0 {storage => registry/storage}/manifeststore.go | 0 {storage => registry/storage}/manifeststore_test.go | 0 {storage => registry/storage}/notifications/bridge.go | 2 +- {storage => registry/storage}/notifications/endpoint.go | 0 {storage => registry/storage}/notifications/event.go | 0 {storage => registry/storage}/notifications/event_test.go | 0 {storage => registry/storage}/notifications/http.go | 0 {storage => registry/storage}/notifications/http_test.go | 0 {storage => registry/storage}/notifications/listener.go | 2 +- {storage => registry/storage}/notifications/listener_test.go | 2 +- {storage => registry/storage}/notifications/metrics.go | 0 {storage => registry/storage}/notifications/sinks.go | 0 {storage => registry/storage}/notifications/sinks_test.go | 0 {storage => registry/storage}/paths.go | 0 {storage => registry/storage}/paths_test.go | 0 {storage => registry/storage}/registry.go | 0 {storage => registry/storage}/revisionstore.go | 0 {storage => registry/storage}/services.go | 0 {storage => registry/storage}/tagstore.go | 0 40 files changed, 11 insertions(+), 11 deletions(-) rename {storage => registry/storage}/blobstore.go (100%) rename {storage => registry/storage}/cloudfrontlayerhandler.go (100%) rename {storage => registry/storage}/delegatelayerhandler.go (100%) rename {storage => registry/storage}/doc.go (100%) rename {storage => registry/storage}/filereader.go (100%) rename {storage => registry/storage}/filereader_test.go (100%) rename {storage => registry/storage}/filewriter.go (100%) rename {storage => registry/storage}/filewriter_test.go (100%) rename {storage => registry/storage}/layer.go (100%) rename {storage => registry/storage}/layer_test.go (100%) rename {storage => registry/storage}/layerhandler.go (100%) rename {storage => registry/storage}/layerreader.go (100%) rename {storage => registry/storage}/layerstore.go (100%) rename {storage => registry/storage}/layerupload.go (100%) rename {storage => registry/storage}/manifeststore.go (100%) rename {storage => registry/storage}/manifeststore_test.go (100%) rename {storage => registry/storage}/notifications/bridge.go (98%) rename {storage => registry/storage}/notifications/endpoint.go (100%) rename {storage => registry/storage}/notifications/event.go (100%) rename {storage => registry/storage}/notifications/event_test.go (100%) rename {storage => registry/storage}/notifications/http.go (100%) rename {storage => registry/storage}/notifications/http_test.go (100%) rename {storage => registry/storage}/notifications/listener.go (98%) rename {storage => registry/storage}/notifications/listener_test.go (98%) rename {storage => registry/storage}/notifications/metrics.go (100%) rename {storage => registry/storage}/notifications/sinks.go (100%) rename {storage => registry/storage}/notifications/sinks_test.go (100%) rename {storage => registry/storage}/paths.go (100%) rename {storage => registry/storage}/paths_test.go (100%) rename {storage => registry/storage}/registry.go (100%) rename {storage => registry/storage}/revisionstore.go (100%) rename {storage => registry/storage}/services.go (100%) rename {storage => registry/storage}/tagstore.go (100%) diff --git a/registry/handlers/app.go b/registry/handlers/app.go index 5f433e95da..09c0c621e6 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -11,8 +11,8 @@ import ( "github.com/docker/distribution/registry/auth" "github.com/docker/distribution/configuration" ctxu "github.com/docker/distribution/context" - "github.com/docker/distribution/storage" - "github.com/docker/distribution/storage/notifications" + "github.com/docker/distribution/registry/storage" + "github.com/docker/distribution/registry/storage/notifications" "github.com/docker/distribution/storagedriver" "github.com/docker/distribution/storagedriver/factory" "github.com/gorilla/mux" diff --git a/registry/handlers/app_test.go b/registry/handlers/app_test.go index 8da285a38d..b27c788a0d 100644 --- a/registry/handlers/app_test.go +++ b/registry/handlers/app_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/distribution/registry/api/v2" _ "github.com/docker/distribution/registry/auth/silly" "github.com/docker/distribution/configuration" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" "github.com/docker/distribution/storagedriver/inmemory" "golang.org/x/net/context" ) diff --git a/registry/handlers/context.go b/registry/handlers/context.go index c940d8f4b6..a49253eeac 100644 --- a/registry/handlers/context.go +++ b/registry/handlers/context.go @@ -7,7 +7,7 @@ import ( "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" "golang.org/x/net/context" ) diff --git a/registry/handlers/images.go b/registry/handlers/images.go index 9c2dfa437a..6a0e9a40ae 100644 --- a/registry/handlers/images.go +++ b/registry/handlers/images.go @@ -9,7 +9,7 @@ import ( ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/registry/handlers/layer.go b/registry/handlers/layer.go index 73641ddeba..8214fbf0cd 100644 --- a/registry/handlers/layer.go +++ b/registry/handlers/layer.go @@ -6,7 +6,7 @@ import ( "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/registry/handlers/layerupload.go b/registry/handlers/layerupload.go index 190cf86bf2..83ef6fb6cc 100644 --- a/registry/handlers/layerupload.go +++ b/registry/handlers/layerupload.go @@ -10,7 +10,7 @@ import ( "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/registry/handlers/tags.go b/registry/handlers/tags.go index 1e8e43d55c..0a764693d8 100644 --- a/registry/handlers/tags.go +++ b/registry/handlers/tags.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/docker/distribution/registry/api/v2" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/storage/blobstore.go b/registry/storage/blobstore.go similarity index 100% rename from storage/blobstore.go rename to registry/storage/blobstore.go diff --git a/storage/cloudfrontlayerhandler.go b/registry/storage/cloudfrontlayerhandler.go similarity index 100% rename from storage/cloudfrontlayerhandler.go rename to registry/storage/cloudfrontlayerhandler.go diff --git a/storage/delegatelayerhandler.go b/registry/storage/delegatelayerhandler.go similarity index 100% rename from storage/delegatelayerhandler.go rename to registry/storage/delegatelayerhandler.go diff --git a/storage/doc.go b/registry/storage/doc.go similarity index 100% rename from storage/doc.go rename to registry/storage/doc.go diff --git a/storage/filereader.go b/registry/storage/filereader.go similarity index 100% rename from storage/filereader.go rename to registry/storage/filereader.go diff --git a/storage/filereader_test.go b/registry/storage/filereader_test.go similarity index 100% rename from storage/filereader_test.go rename to registry/storage/filereader_test.go diff --git a/storage/filewriter.go b/registry/storage/filewriter.go similarity index 100% rename from storage/filewriter.go rename to registry/storage/filewriter.go diff --git a/storage/filewriter_test.go b/registry/storage/filewriter_test.go similarity index 100% rename from storage/filewriter_test.go rename to registry/storage/filewriter_test.go diff --git a/storage/layer.go b/registry/storage/layer.go similarity index 100% rename from storage/layer.go rename to registry/storage/layer.go diff --git a/storage/layer_test.go b/registry/storage/layer_test.go similarity index 100% rename from storage/layer_test.go rename to registry/storage/layer_test.go diff --git a/storage/layerhandler.go b/registry/storage/layerhandler.go similarity index 100% rename from storage/layerhandler.go rename to registry/storage/layerhandler.go diff --git a/storage/layerreader.go b/registry/storage/layerreader.go similarity index 100% rename from storage/layerreader.go rename to registry/storage/layerreader.go diff --git a/storage/layerstore.go b/registry/storage/layerstore.go similarity index 100% rename from storage/layerstore.go rename to registry/storage/layerstore.go diff --git a/storage/layerupload.go b/registry/storage/layerupload.go similarity index 100% rename from storage/layerupload.go rename to registry/storage/layerupload.go diff --git a/storage/manifeststore.go b/registry/storage/manifeststore.go similarity index 100% rename from storage/manifeststore.go rename to registry/storage/manifeststore.go diff --git a/storage/manifeststore_test.go b/registry/storage/manifeststore_test.go similarity index 100% rename from storage/manifeststore_test.go rename to registry/storage/manifeststore_test.go diff --git a/storage/notifications/bridge.go b/registry/storage/notifications/bridge.go similarity index 98% rename from storage/notifications/bridge.go rename to registry/storage/notifications/bridge.go index d6f41ba0c8..217ee5bd3b 100644 --- a/storage/notifications/bridge.go +++ b/registry/storage/notifications/bridge.go @@ -8,7 +8,7 @@ import ( "code.google.com/p/go-uuid/uuid" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" ) type bridge struct { diff --git a/storage/notifications/endpoint.go b/registry/storage/notifications/endpoint.go similarity index 100% rename from storage/notifications/endpoint.go rename to registry/storage/notifications/endpoint.go diff --git a/storage/notifications/event.go b/registry/storage/notifications/event.go similarity index 100% rename from storage/notifications/event.go rename to registry/storage/notifications/event.go diff --git a/storage/notifications/event_test.go b/registry/storage/notifications/event_test.go similarity index 100% rename from storage/notifications/event_test.go rename to registry/storage/notifications/event_test.go diff --git a/storage/notifications/http.go b/registry/storage/notifications/http.go similarity index 100% rename from storage/notifications/http.go rename to registry/storage/notifications/http.go diff --git a/storage/notifications/http_test.go b/registry/storage/notifications/http_test.go similarity index 100% rename from storage/notifications/http_test.go rename to registry/storage/notifications/http_test.go diff --git a/storage/notifications/listener.go b/registry/storage/notifications/listener.go similarity index 98% rename from storage/notifications/listener.go rename to registry/storage/notifications/listener.go index 2d7bb112b2..99a06f021d 100644 --- a/storage/notifications/listener.go +++ b/registry/storage/notifications/listener.go @@ -4,7 +4,7 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" ) // ManifestListener describes a set of methods for listening to events related to manifests. diff --git a/storage/notifications/listener_test.go b/registry/storage/notifications/listener_test.go similarity index 98% rename from storage/notifications/listener_test.go rename to registry/storage/notifications/listener_test.go index 30d3f43f35..b62e7e7e82 100644 --- a/storage/notifications/listener_test.go +++ b/registry/storage/notifications/listener_test.go @@ -7,7 +7,7 @@ import ( "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/storage" "github.com/docker/distribution/storagedriver/inmemory" "github.com/docker/distribution/testutil" "github.com/docker/libtrust" diff --git a/storage/notifications/metrics.go b/registry/storage/notifications/metrics.go similarity index 100% rename from storage/notifications/metrics.go rename to registry/storage/notifications/metrics.go diff --git a/storage/notifications/sinks.go b/registry/storage/notifications/sinks.go similarity index 100% rename from storage/notifications/sinks.go rename to registry/storage/notifications/sinks.go diff --git a/storage/notifications/sinks_test.go b/registry/storage/notifications/sinks_test.go similarity index 100% rename from storage/notifications/sinks_test.go rename to registry/storage/notifications/sinks_test.go diff --git a/storage/paths.go b/registry/storage/paths.go similarity index 100% rename from storage/paths.go rename to registry/storage/paths.go diff --git a/storage/paths_test.go b/registry/storage/paths_test.go similarity index 100% rename from storage/paths_test.go rename to registry/storage/paths_test.go diff --git a/storage/registry.go b/registry/storage/registry.go similarity index 100% rename from storage/registry.go rename to registry/storage/registry.go diff --git a/storage/revisionstore.go b/registry/storage/revisionstore.go similarity index 100% rename from storage/revisionstore.go rename to registry/storage/revisionstore.go diff --git a/storage/services.go b/registry/storage/services.go similarity index 100% rename from storage/services.go rename to registry/storage/services.go diff --git a/storage/tagstore.go b/registry/storage/tagstore.go similarity index 100% rename from storage/tagstore.go rename to registry/storage/tagstore.go From 65b0d73cb749fd9757352f472e399024f1c597df Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 10 Feb 2015 18:14:23 -0800 Subject: [PATCH 6/7] Move storagedriver package to registry/storage/driver This change is slightly more complex than previous package maves in that the package name changed. To address this, we simply always reference the package driver as storagedriver to avoid compatbility issues with existing code. While unfortunate, this can be cleaned up over time. Signed-off-by: Stephen J Day --- cmd/registry-storagedriver-azure/main.go | 4 ++-- cmd/registry-storagedriver-filesystem/main.go | 4 ++-- cmd/registry-storagedriver-inmemory/main.go | 4 ++-- cmd/registry-storagedriver-s3/main.go | 4 ++-- cmd/registry/main.go | 10 +++++----- registry/handlers/api_test.go | 4 ++-- registry/handlers/app.go | 8 ++++---- registry/handlers/app_test.go | 4 ++-- registry/storage/blobstore.go | 2 +- registry/storage/cloudfrontlayerhandler.go | 2 +- registry/storage/delegatelayerhandler.go | 2 +- {storagedriver => registry/storage/driver}/README.md | 0 .../storage/driver}/azure/azure.go | 6 +++--- .../storage/driver}/azure/azure_test.go | 4 ++-- .../storage/driver}/azure/blockblob.go | 0 .../storage/driver}/azure/blockblob_test.go | 0 .../storage/driver}/azure/blockid.go | 0 .../storage/driver}/azure/blockid_test.go | 0 .../storage/driver}/azure/randomwriter.go | 0 .../storage/driver}/azure/randomwriter_test.go | 0 .../storage/driver}/azure/zerofillwriter.go | 0 .../storage/driver}/azure/zerofillwriter_test.go | 0 .../storage/driver}/base/base.go | 2 +- .../storage/driver}/factory/factory.go | 2 +- {storagedriver => registry/storage/driver}/fileinfo.go | 2 +- .../storage/driver}/filesystem/README.md | 0 .../storage/driver}/filesystem/driver.go | 6 +++--- .../storage/driver}/filesystem/driver_test.go | 4 ++-- .../storage/driver}/inmemory/README.md | 0 .../storage/driver}/inmemory/driver.go | 6 +++--- .../storage/driver}/inmemory/driver_test.go | 4 ++-- .../storage/driver}/inmemory/mfs.go | 0 .../storage/driver}/ipc/client.go | 2 +- {storagedriver => registry/storage/driver}/ipc/ipc.go | 2 +- .../storage/driver}/ipc/server.go | 2 +- .../storage/driver}/s3/README.md | 0 {storagedriver => registry/storage/driver}/s3/s3.go | 6 +++--- .../storage/driver}/s3/s3_test.go | 4 ++-- .../storage/driver}/storagedriver.go | 2 +- .../storage/driver}/testsuites/testsuites.go | 2 +- registry/storage/filereader.go | 2 +- registry/storage/filereader_test.go | 2 +- registry/storage/filewriter.go | 2 +- registry/storage/filewriter_test.go | 2 +- registry/storage/layer_test.go | 4 ++-- registry/storage/layerhandler.go | 2 +- registry/storage/layerstore.go | 2 +- registry/storage/layerupload.go | 2 +- registry/storage/manifeststore_test.go | 2 +- registry/storage/notifications/listener_test.go | 2 +- registry/storage/registry.go | 2 +- registry/storage/tagstore.go | 2 +- 52 files changed, 65 insertions(+), 65 deletions(-) rename {storagedriver => registry/storage/driver}/README.md (100%) rename {storagedriver => registry/storage/driver}/azure/azure.go (97%) rename {storagedriver => registry/storage/driver}/azure/azure_test.go (90%) rename {storagedriver => registry/storage/driver}/azure/blockblob.go (100%) rename {storagedriver => registry/storage/driver}/azure/blockblob_test.go (100%) rename {storagedriver => registry/storage/driver}/azure/blockid.go (100%) rename {storagedriver => registry/storage/driver}/azure/blockid_test.go (100%) rename {storagedriver => registry/storage/driver}/azure/randomwriter.go (100%) rename {storagedriver => registry/storage/driver}/azure/randomwriter_test.go (100%) rename {storagedriver => registry/storage/driver}/azure/zerofillwriter.go (100%) rename {storagedriver => registry/storage/driver}/azure/zerofillwriter_test.go (100%) rename {storagedriver => registry/storage/driver}/base/base.go (98%) rename {storagedriver => registry/storage/driver}/factory/factory.go (97%) rename {storagedriver => registry/storage/driver}/fileinfo.go (99%) rename {storagedriver => registry/storage/driver}/filesystem/README.md (100%) rename {storagedriver => registry/storage/driver}/filesystem/driver.go (97%) rename {storagedriver => registry/storage/driver}/filesystem/driver_test.go (81%) rename {storagedriver => registry/storage/driver}/inmemory/README.md (100%) rename {storagedriver => registry/storage/driver}/inmemory/driver.go (96%) rename {storagedriver => registry/storage/driver}/inmemory/driver_test.go (79%) rename {storagedriver => registry/storage/driver}/inmemory/mfs.go (100%) rename {storagedriver => registry/storage/driver}/ipc/client.go (99%) rename {storagedriver => registry/storage/driver}/ipc/ipc.go (98%) rename {storagedriver => registry/storage/driver}/ipc/server.go (98%) rename {storagedriver => registry/storage/driver}/s3/README.md (100%) rename {storagedriver => registry/storage/driver}/s3/s3.go (98%) rename {storagedriver => registry/storage/driver}/s3/s3_test.go (93%) rename {storagedriver => registry/storage/driver}/storagedriver.go (99%) rename {storagedriver => registry/storage/driver}/testsuites/testsuites.go (99%) diff --git a/cmd/registry-storagedriver-azure/main.go b/cmd/registry-storagedriver-azure/main.go index 71b1faaf65..8083d23b44 100644 --- a/cmd/registry-storagedriver-azure/main.go +++ b/cmd/registry-storagedriver-azure/main.go @@ -7,8 +7,8 @@ import ( "os" log "github.com/Sirupsen/logrus" - "github.com/docker/distribution/storagedriver/azure" - "github.com/docker/distribution/storagedriver/ipc" + "github.com/docker/distribution/registry/storage/driver/azure" + "github.com/docker/distribution/registry/storage/driver/ipc" ) // An out-of-process Azure Storage driver, intended to be run by ipc.NewDriverClient diff --git a/cmd/registry-storagedriver-filesystem/main.go b/cmd/registry-storagedriver-filesystem/main.go index 2ad6d82e76..93756d2c01 100644 --- a/cmd/registry-storagedriver-filesystem/main.go +++ b/cmd/registry-storagedriver-filesystem/main.go @@ -8,8 +8,8 @@ import ( "github.com/Sirupsen/logrus" - "github.com/docker/distribution/storagedriver/filesystem" - "github.com/docker/distribution/storagedriver/ipc" + "github.com/docker/distribution/registry/storage/driver/filesystem" + "github.com/docker/distribution/registry/storage/driver/ipc" ) // An out-of-process filesystem driver, intended to be run by ipc.NewDriverClient diff --git a/cmd/registry-storagedriver-inmemory/main.go b/cmd/registry-storagedriver-inmemory/main.go index ef6fabe49b..d957cc2540 100644 --- a/cmd/registry-storagedriver-inmemory/main.go +++ b/cmd/registry-storagedriver-inmemory/main.go @@ -4,8 +4,8 @@ package main import ( "github.com/Sirupsen/logrus" - "github.com/docker/distribution/storagedriver/inmemory" - "github.com/docker/distribution/storagedriver/ipc" + "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/registry/storage/driver/ipc" ) // An out-of-process inmemory driver, intended to be run by ipc.NewDriverClient diff --git a/cmd/registry-storagedriver-s3/main.go b/cmd/registry-storagedriver-s3/main.go index be49f15769..8604fef076 100644 --- a/cmd/registry-storagedriver-s3/main.go +++ b/cmd/registry-storagedriver-s3/main.go @@ -8,8 +8,8 @@ import ( "github.com/Sirupsen/logrus" - "github.com/docker/distribution/storagedriver/ipc" - "github.com/docker/distribution/storagedriver/s3" + "github.com/docker/distribution/registry/storage/driver/ipc" + "github.com/docker/distribution/registry/storage/driver/s3" ) // An out-of-process S3 driver, intended to be run by ipc.NewDriverClient diff --git a/cmd/registry/main.go b/cmd/registry/main.go index 535b9cde0f..79f45ab0ce 100644 --- a/cmd/registry/main.go +++ b/cmd/registry/main.go @@ -10,14 +10,14 @@ import ( log "github.com/Sirupsen/logrus" "github.com/bugsnag/bugsnag-go" - _ "github.com/docker/distribution/registry/auth/silly" - _ "github.com/docker/distribution/registry/auth/token" "github.com/docker/distribution/configuration" ctxu "github.com/docker/distribution/context" + _ "github.com/docker/distribution/registry/auth/silly" + _ "github.com/docker/distribution/registry/auth/token" "github.com/docker/distribution/registry/handlers" - _ "github.com/docker/distribution/storagedriver/filesystem" - _ "github.com/docker/distribution/storagedriver/inmemory" - _ "github.com/docker/distribution/storagedriver/s3" + _ "github.com/docker/distribution/registry/storage/driver/filesystem" + _ "github.com/docker/distribution/registry/storage/driver/inmemory" + _ "github.com/docker/distribution/registry/storage/driver/s3" "github.com/docker/distribution/version" gorhandlers "github.com/gorilla/handlers" "github.com/yvasiyarov/gorelic" diff --git a/registry/handlers/api_test.go b/registry/handlers/api_test.go index 08d0cf9724..a14e93dc96 100644 --- a/registry/handlers/api_test.go +++ b/registry/handlers/api_test.go @@ -14,11 +14,11 @@ import ( "reflect" "testing" - "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/configuration" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" - _ "github.com/docker/distribution/storagedriver/inmemory" + "github.com/docker/distribution/registry/api/v2" + _ "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/docker/distribution/testutil" "github.com/docker/libtrust" "github.com/gorilla/handlers" diff --git a/registry/handlers/app.go b/registry/handlers/app.go index 09c0c621e6..7a36309bb2 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -7,14 +7,14 @@ import ( "os" "code.google.com/p/go-uuid/uuid" - "github.com/docker/distribution/registry/api/v2" - "github.com/docker/distribution/registry/auth" "github.com/docker/distribution/configuration" ctxu "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/auth" "github.com/docker/distribution/registry/storage" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/factory" "github.com/docker/distribution/registry/storage/notifications" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/factory" "github.com/gorilla/mux" "golang.org/x/net/context" ) diff --git a/registry/handlers/app_test.go b/registry/handlers/app_test.go index b27c788a0d..158f5fc18c 100644 --- a/registry/handlers/app_test.go +++ b/registry/handlers/app_test.go @@ -7,11 +7,11 @@ import ( "net/url" "testing" + "github.com/docker/distribution/configuration" "github.com/docker/distribution/registry/api/v2" _ "github.com/docker/distribution/registry/auth/silly" - "github.com/docker/distribution/configuration" "github.com/docker/distribution/registry/storage" - "github.com/docker/distribution/storagedriver/inmemory" + "github.com/docker/distribution/registry/storage/driver/inmemory" "golang.org/x/net/context" ) diff --git a/registry/storage/blobstore.go b/registry/storage/blobstore.go index ac123f44a6..975df19f96 100644 --- a/registry/storage/blobstore.go +++ b/registry/storage/blobstore.go @@ -5,7 +5,7 @@ import ( ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "golang.org/x/net/context" ) diff --git a/registry/storage/cloudfrontlayerhandler.go b/registry/storage/cloudfrontlayerhandler.go index fa420cc7d2..f887895c63 100644 --- a/registry/storage/cloudfrontlayerhandler.go +++ b/registry/storage/cloudfrontlayerhandler.go @@ -10,7 +10,7 @@ import ( "time" "github.com/AdRoll/goamz/cloudfront" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // cloudFrontLayerHandler provides an simple implementation of layerHandler that diff --git a/registry/storage/delegatelayerhandler.go b/registry/storage/delegatelayerhandler.go index 7ed6d87b98..0135402385 100644 --- a/registry/storage/delegatelayerhandler.go +++ b/registry/storage/delegatelayerhandler.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // delegateLayerHandler provides a simple implementation of layerHandler that diff --git a/storagedriver/README.md b/registry/storage/driver/README.md similarity index 100% rename from storagedriver/README.md rename to registry/storage/driver/README.md diff --git a/storagedriver/azure/azure.go b/registry/storage/driver/azure/azure.go similarity index 97% rename from storagedriver/azure/azure.go rename to registry/storage/driver/azure/azure.go index b6c42f666d..6ccbff40b0 100644 --- a/storagedriver/azure/azure.go +++ b/registry/storage/driver/azure/azure.go @@ -11,9 +11,9 @@ import ( "strings" "time" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/base" - "github.com/docker/distribution/storagedriver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" ) diff --git a/storagedriver/azure/azure_test.go b/registry/storage/driver/azure/azure_test.go similarity index 90% rename from storagedriver/azure/azure_test.go rename to registry/storage/driver/azure/azure_test.go index 170e20f87c..a8fdf3e900 100644 --- a/storagedriver/azure/azure_test.go +++ b/registry/storage/driver/azure/azure_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/testsuites" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" . "gopkg.in/check.v1" ) diff --git a/storagedriver/azure/blockblob.go b/registry/storage/driver/azure/blockblob.go similarity index 100% rename from storagedriver/azure/blockblob.go rename to registry/storage/driver/azure/blockblob.go diff --git a/storagedriver/azure/blockblob_test.go b/registry/storage/driver/azure/blockblob_test.go similarity index 100% rename from storagedriver/azure/blockblob_test.go rename to registry/storage/driver/azure/blockblob_test.go diff --git a/storagedriver/azure/blockid.go b/registry/storage/driver/azure/blockid.go similarity index 100% rename from storagedriver/azure/blockid.go rename to registry/storage/driver/azure/blockid.go diff --git a/storagedriver/azure/blockid_test.go b/registry/storage/driver/azure/blockid_test.go similarity index 100% rename from storagedriver/azure/blockid_test.go rename to registry/storage/driver/azure/blockid_test.go diff --git a/storagedriver/azure/randomwriter.go b/registry/storage/driver/azure/randomwriter.go similarity index 100% rename from storagedriver/azure/randomwriter.go rename to registry/storage/driver/azure/randomwriter.go diff --git a/storagedriver/azure/randomwriter_test.go b/registry/storage/driver/azure/randomwriter_test.go similarity index 100% rename from storagedriver/azure/randomwriter_test.go rename to registry/storage/driver/azure/randomwriter_test.go diff --git a/storagedriver/azure/zerofillwriter.go b/registry/storage/driver/azure/zerofillwriter.go similarity index 100% rename from storagedriver/azure/zerofillwriter.go rename to registry/storage/driver/azure/zerofillwriter.go diff --git a/storagedriver/azure/zerofillwriter_test.go b/registry/storage/driver/azure/zerofillwriter_test.go similarity index 100% rename from storagedriver/azure/zerofillwriter_test.go rename to registry/storage/driver/azure/zerofillwriter_test.go diff --git a/storagedriver/base/base.go b/registry/storage/driver/base/base.go similarity index 98% rename from storagedriver/base/base.go rename to registry/storage/driver/base/base.go index 51fdf512bf..0365ba3cd1 100644 --- a/storagedriver/base/base.go +++ b/registry/storage/driver/base/base.go @@ -40,7 +40,7 @@ package base import ( "io" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // Base provides a wrapper around a storagedriver implementation that provides diff --git a/storagedriver/factory/factory.go b/registry/storage/driver/factory/factory.go similarity index 97% rename from storagedriver/factory/factory.go rename to registry/storage/driver/factory/factory.go index ba3b7dfac9..66d160f385 100644 --- a/storagedriver/factory/factory.go +++ b/registry/storage/driver/factory/factory.go @@ -3,7 +3,7 @@ package factory import ( "fmt" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // driverFactories stores an internal mapping between storage driver names and their respective diff --git a/storagedriver/fileinfo.go b/registry/storage/driver/fileinfo.go similarity index 99% rename from storagedriver/fileinfo.go rename to registry/storage/driver/fileinfo.go index 82e3d5469f..e5064029ad 100644 --- a/storagedriver/fileinfo.go +++ b/registry/storage/driver/fileinfo.go @@ -1,4 +1,4 @@ -package storagedriver +package driver import "time" diff --git a/storagedriver/filesystem/README.md b/registry/storage/driver/filesystem/README.md similarity index 100% rename from storagedriver/filesystem/README.md rename to registry/storage/driver/filesystem/README.md diff --git a/storagedriver/filesystem/driver.go b/registry/storage/driver/filesystem/driver.go similarity index 97% rename from storagedriver/filesystem/driver.go rename to registry/storage/driver/filesystem/driver.go index e76b4bab05..0e5aea755b 100644 --- a/storagedriver/filesystem/driver.go +++ b/registry/storage/driver/filesystem/driver.go @@ -9,9 +9,9 @@ import ( "path" "time" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/base" - "github.com/docker/distribution/storagedriver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" ) const driverName = "filesystem" diff --git a/storagedriver/filesystem/driver_test.go b/registry/storage/driver/filesystem/driver_test.go similarity index 81% rename from storagedriver/filesystem/driver_test.go rename to registry/storage/driver/filesystem/driver_test.go index 08b203bd48..8572de16e7 100644 --- a/storagedriver/filesystem/driver_test.go +++ b/registry/storage/driver/filesystem/driver_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/testsuites" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" . "gopkg.in/check.v1" ) diff --git a/storagedriver/inmemory/README.md b/registry/storage/driver/inmemory/README.md similarity index 100% rename from storagedriver/inmemory/README.md rename to registry/storage/driver/inmemory/README.md diff --git a/storagedriver/inmemory/driver.go b/registry/storage/driver/inmemory/driver.go similarity index 96% rename from storagedriver/inmemory/driver.go rename to registry/storage/driver/inmemory/driver.go index d3fdec57da..f2c9c3ffb4 100644 --- a/storagedriver/inmemory/driver.go +++ b/registry/storage/driver/inmemory/driver.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/base" - "github.com/docker/distribution/storagedriver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" ) const driverName = "inmemory" diff --git a/storagedriver/inmemory/driver_test.go b/registry/storage/driver/inmemory/driver_test.go similarity index 79% rename from storagedriver/inmemory/driver_test.go rename to registry/storage/driver/inmemory/driver_test.go index 1034422ee7..a02ff23e32 100644 --- a/storagedriver/inmemory/driver_test.go +++ b/registry/storage/driver/inmemory/driver_test.go @@ -3,8 +3,8 @@ package inmemory import ( "testing" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/testsuites" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" "gopkg.in/check.v1" ) diff --git a/storagedriver/inmemory/mfs.go b/registry/storage/driver/inmemory/mfs.go similarity index 100% rename from storagedriver/inmemory/mfs.go rename to registry/storage/driver/inmemory/mfs.go diff --git a/storagedriver/ipc/client.go b/registry/storage/driver/ipc/client.go similarity index 99% rename from storagedriver/ipc/client.go rename to registry/storage/driver/ipc/client.go index fab731132c..daa823d7e9 100644 --- a/storagedriver/ipc/client.go +++ b/registry/storage/driver/ipc/client.go @@ -13,7 +13,7 @@ import ( "os/exec" "syscall" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/docker/libchan" "github.com/docker/libchan/spdy" ) diff --git a/storagedriver/ipc/ipc.go b/registry/storage/driver/ipc/ipc.go similarity index 98% rename from storagedriver/ipc/ipc.go rename to registry/storage/driver/ipc/ipc.go index e7ddd69e76..dabb834de1 100644 --- a/storagedriver/ipc/ipc.go +++ b/registry/storage/driver/ipc/ipc.go @@ -7,7 +7,7 @@ import ( "io" "reflect" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/docker/libchan" ) diff --git a/storagedriver/ipc/server.go b/registry/storage/driver/ipc/server.go similarity index 98% rename from storagedriver/ipc/server.go rename to registry/storage/driver/ipc/server.go index 6d7df2eb70..4c6f1d4dee 100644 --- a/storagedriver/ipc/server.go +++ b/registry/storage/driver/ipc/server.go @@ -10,7 +10,7 @@ import ( "os" "reflect" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/docker/libchan" "github.com/docker/libchan/spdy" ) diff --git a/storagedriver/s3/README.md b/registry/storage/driver/s3/README.md similarity index 100% rename from storagedriver/s3/README.md rename to registry/storage/driver/s3/README.md diff --git a/storagedriver/s3/s3.go b/registry/storage/driver/s3/s3.go similarity index 98% rename from storagedriver/s3/s3.go rename to registry/storage/driver/s3/s3.go index c9d4ccbed7..eb9f08f492 100644 --- a/storagedriver/s3/s3.go +++ b/registry/storage/driver/s3/s3.go @@ -26,9 +26,9 @@ import ( "github.com/AdRoll/goamz/aws" "github.com/AdRoll/goamz/s3" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/base" - "github.com/docker/distribution/storagedriver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" ) const driverName = "s3" diff --git a/storagedriver/s3/s3_test.go b/registry/storage/driver/s3/s3_test.go similarity index 93% rename from storagedriver/s3/s3_test.go rename to registry/storage/driver/s3/s3_test.go index 0175e8acbb..fb2003e1e3 100644 --- a/storagedriver/s3/s3_test.go +++ b/registry/storage/driver/s3/s3_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/AdRoll/goamz/aws" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/testsuites" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" "gopkg.in/check.v1" ) diff --git a/storagedriver/storagedriver.go b/registry/storage/driver/storagedriver.go similarity index 99% rename from storagedriver/storagedriver.go rename to registry/storage/driver/storagedriver.go index c94ef8d619..dd8fb4a06f 100644 --- a/storagedriver/storagedriver.go +++ b/registry/storage/driver/storagedriver.go @@ -1,4 +1,4 @@ -package storagedriver +package driver import ( "errors" diff --git a/storagedriver/testsuites/testsuites.go b/registry/storage/driver/testsuites/testsuites.go similarity index 99% rename from storagedriver/testsuites/testsuites.go rename to registry/storage/driver/testsuites/testsuites.go index da12762712..cfa3a48a42 100644 --- a/storagedriver/testsuites/testsuites.go +++ b/registry/storage/driver/testsuites/testsuites.go @@ -14,7 +14,7 @@ import ( "testing" "time" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "gopkg.in/check.v1" ) diff --git a/registry/storage/filereader.go b/registry/storage/filereader.go index 9bc09afefa..4cb2b3313c 100644 --- a/registry/storage/filereader.go +++ b/registry/storage/filereader.go @@ -9,7 +9,7 @@ import ( "os" "time" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // TODO(stevvooe): Set an optimal buffer size here. We'll have to diff --git a/registry/storage/filereader_test.go b/registry/storage/filereader_test.go index 53dd6c9a5f..7c554e8b9f 100644 --- a/registry/storage/filereader_test.go +++ b/registry/storage/filereader_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/distribution/digest" - "github.com/docker/distribution/storagedriver/inmemory" + "github.com/docker/distribution/registry/storage/driver/inmemory" ) func TestSimpleRead(t *testing.T) { diff --git a/registry/storage/filewriter.go b/registry/storage/filewriter.go index 5037f1608a..cbf03704c7 100644 --- a/registry/storage/filewriter.go +++ b/registry/storage/filewriter.go @@ -6,7 +6,7 @@ import ( "io" "os" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // fileWriter implements a remote file writer backed by a storage driver. diff --git a/registry/storage/filewriter_test.go b/registry/storage/filewriter_test.go index 2235462f88..1a38a51936 100644 --- a/registry/storage/filewriter_test.go +++ b/registry/storage/filewriter_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storagedriver/inmemory" + "github.com/docker/distribution/registry/storage/driver/inmemory" ) // TestSimpleWrite takes the fileWriter through common write operations diff --git a/registry/storage/layer_test.go b/registry/storage/layer_test.go index c7d64b7945..4898299319 100644 --- a/registry/storage/layer_test.go +++ b/registry/storage/layer_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storagedriver" - "github.com/docker/distribution/storagedriver/inmemory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/docker/distribution/testutil" "golang.org/x/net/context" ) diff --git a/registry/storage/layerhandler.go b/registry/storage/layerhandler.go index 2755470ebf..5bcfedddfa 100644 --- a/registry/storage/layerhandler.go +++ b/registry/storage/layerhandler.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // LayerHandler provides middleware for serving the contents of a Layer. diff --git a/registry/storage/layerstore.go b/registry/storage/layerstore.go index b6578792d4..e4760b4ea4 100644 --- a/registry/storage/layerstore.go +++ b/registry/storage/layerstore.go @@ -7,7 +7,7 @@ import ( ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) type layerStore struct { diff --git a/registry/storage/layerupload.go b/registry/storage/layerupload.go index 54860913a7..e6cf21a9c7 100644 --- a/registry/storage/layerupload.go +++ b/registry/storage/layerupload.go @@ -9,7 +9,7 @@ import ( "github.com/Sirupsen/logrus" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/docker/docker/pkg/tarsum" ) diff --git a/registry/storage/manifeststore_test.go b/registry/storage/manifeststore_test.go index 8284ce9486..1fd026629b 100644 --- a/registry/storage/manifeststore_test.go +++ b/registry/storage/manifeststore_test.go @@ -8,7 +8,7 @@ import ( "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" - "github.com/docker/distribution/storagedriver/inmemory" + "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/docker/distribution/testutil" "github.com/docker/libtrust" "golang.org/x/net/context" diff --git a/registry/storage/notifications/listener_test.go b/registry/storage/notifications/listener_test.go index b62e7e7e82..b8d6a31e54 100644 --- a/registry/storage/notifications/listener_test.go +++ b/registry/storage/notifications/listener_test.go @@ -8,7 +8,7 @@ import ( "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" "github.com/docker/distribution/registry/storage" - "github.com/docker/distribution/storagedriver/inmemory" + "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/docker/distribution/testutil" "github.com/docker/libtrust" "golang.org/x/net/context" diff --git a/registry/storage/registry.go b/registry/storage/registry.go index ed8650076d..c4ca2f8004 100644 --- a/registry/storage/registry.go +++ b/registry/storage/registry.go @@ -1,7 +1,7 @@ package storage import ( - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "golang.org/x/net/context" ) diff --git a/registry/storage/tagstore.go b/registry/storage/tagstore.go index f7b87a25af..6ae3e5f88e 100644 --- a/registry/storage/tagstore.go +++ b/registry/storage/tagstore.go @@ -4,7 +4,7 @@ import ( "path" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storagedriver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // tagStore provides methods to manage manifest tags in a backend storage driver. From f74b9852fe77f1fb45745af3645ff69cf31f5645 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 10 Feb 2015 18:18:45 -0800 Subject: [PATCH 7/7] Run goimports/gofmt on previous changes After all of the perl refactoring, some import orderings were left asunder. This commit corrects that. Signed-off-by: Stephen J Day --- registry/auth/silly/access.go | 2 +- registry/auth/token/accesscontroller.go | 2 +- registry/client/client.go | 2 +- registry/handlers/context.go | 2 +- registry/handlers/images.go | 2 +- registry/handlers/layer.go | 2 +- registry/handlers/layerupload.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/registry/auth/silly/access.go b/registry/auth/silly/access.go index 7d3a4d40d6..20448efda9 100644 --- a/registry/auth/silly/access.go +++ b/registry/auth/silly/access.go @@ -12,8 +12,8 @@ import ( "net/http" "strings" - "github.com/docker/distribution/registry/auth" ctxu "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" "golang.org/x/net/context" ) diff --git a/registry/auth/token/accesscontroller.go b/registry/auth/token/accesscontroller.go index 61b275a701..cb23eab60a 100644 --- a/registry/auth/token/accesscontroller.go +++ b/registry/auth/token/accesscontroller.go @@ -11,8 +11,8 @@ import ( "os" "strings" - "github.com/docker/distribution/registry/auth" ctxu "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" "github.com/docker/libtrust" "golang.org/x/net/context" ) diff --git a/registry/client/client.go b/registry/client/client.go index c697e01ce9..8e868c4185 100644 --- a/registry/client/client.go +++ b/registry/client/client.go @@ -9,9 +9,9 @@ import ( "regexp" "strconv" - "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" + "github.com/docker/distribution/registry/api/v2" ) // Client implements the client interface to the registry http api diff --git a/registry/handlers/context.go b/registry/handlers/context.go index a49253eeac..0d3f44cc0b 100644 --- a/registry/handlers/context.go +++ b/registry/handlers/context.go @@ -4,9 +4,9 @@ import ( "fmt" "net/http" - "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" + "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/registry/storage" "golang.org/x/net/context" ) diff --git a/registry/handlers/images.go b/registry/handlers/images.go index 6a0e9a40ae..e41f368224 100644 --- a/registry/handlers/images.go +++ b/registry/handlers/images.go @@ -5,10 +5,10 @@ import ( "fmt" "net/http" - "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" + "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/registry/handlers/layer.go b/registry/handlers/layer.go index 8214fbf0cd..105c296403 100644 --- a/registry/handlers/layer.go +++ b/registry/handlers/layer.go @@ -3,9 +3,9 @@ package handlers import ( "net/http" - "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" + "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/registry/handlers/layerupload.go b/registry/handlers/layerupload.go index 83ef6fb6cc..237644ea84 100644 --- a/registry/handlers/layerupload.go +++ b/registry/handlers/layerupload.go @@ -7,9 +7,9 @@ import ( "net/url" "os" - "github.com/docker/distribution/registry/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" + "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" )