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 0ed8fcd28..1c3996177 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 000000000..5049dae35 --- /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 5e3bd72c6..1d1173a9a 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 817373f25..e49144e2f 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 9b106575d..927f40a4a 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 55794ee32..8727a3cd1 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 dc563135b..6cf10a25e 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 7c4dbb023..8f277595c 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 6bcb4ae82..f2879137b 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 d24700875..e17ececa2 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 5ad60f61d..cce2cd492 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 c44b0b210..c26a2239a 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 10569465c..31d24b865 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 f30bb3aa6..a15e274a7 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 1f745c6a9..65ffacfc9 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 6495da965..c697e01ce 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 f6f209253..5118d330c 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 1d1173a9a..08d0cf972 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 e49144e2f..876c69b46 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 927f40a4a..249c381b4 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 8f277595c..c940d8f4b 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 c26a2239a..9c2dfa437 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 31d24b865..73641ddeb 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 a15e274a7..190cf86bf 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 65ffacfc9..1e8e43d55 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 1c3996177..535b9cde0 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 c3adba804..7d3a4d40d 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 44d66a4d7..d579e8780 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 2f1e3d6d7..61b275a70 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 6d67374ed..166816eea 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 ab9fb896b..791eb2140 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 876c69b46..5f433e95d 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 249c381b4..8da285a38 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 5f433e95d..09c0c621e 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 8da285a38..b27c788a0 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 c940d8f4b..a49253eea 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 9c2dfa437..6a0e9a40a 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 73641ddeb..8214fbf0c 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 190cf86bf..83ef6fb6c 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 1e8e43d55..0a764693d 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 d6f41ba0c..217ee5bd3 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 2d7bb112b..99a06f021 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 30d3f43f3..b62e7e7e8 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 71b1faaf6..8083d23b4 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 2ad6d82e7..93756d2c0 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 ef6fabe49..d957cc254 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 be49f1576..8604fef07 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 535b9cde0..79f45ab0c 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 08d0cf972..a14e93dc9 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 09c0c621e..7a36309bb 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 b27c788a0..158f5fc18 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 ac123f44a..975df19f9 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 fa420cc7d..f887895c6 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 7ed6d87b9..013540238 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 b6c42f666..6ccbff40b 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 170e20f87..a8fdf3e90 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 51fdf512b..0365ba3cd 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 ba3b7dfac..66d160f38 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 82e3d5469..e5064029a 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 e76b4bab0..0e5aea755 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 08b203bd4..8572de16e 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 d3fdec57d..f2c9c3ffb 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 1034422ee..a02ff23e3 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 fab731132..daa823d7e 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 e7ddd69e7..dabb834de 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 6d7df2eb7..4c6f1d4de 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 c9d4ccbed..eb9f08f49 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 0175e8acb..fb2003e1e 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 c94ef8d61..dd8fb4a06 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 da1276271..cfa3a48a4 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 9bc09afef..4cb2b3313 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 53dd6c9a5..7c554e8b9 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 5037f1608..cbf03704c 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 2235462f8..1a38a5193 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 c7d64b794..489829931 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 2755470eb..5bcfedddf 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 b6578792d..e4760b4ea 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 54860913a..e6cf21a9c 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 8284ce948..1fd026629 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 b62e7e7e8..b8d6a31e5 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 ed8650076..c4ca2f800 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 f7b87a25a..6ae3e5f88 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 7d3a4d40d..20448efda 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 61b275a70..cb23eab60 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 c697e01ce..8e868c418 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 a49253eea..0d3f44cc0 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 6a0e9a40a..e41f36822 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 8214fbf0c..105c29640 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 83ef6fb6c..237644ea8 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" )