diff --git a/cmd/registry-api-descriptor-template/main.go b/cmd/registry-api-descriptor-template/main.go index f6f20925..5118d330 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/cmd/registry-storagedriver-azure/main.go b/cmd/registry-storagedriver-azure/main.go index 71b1faaf..8083d23b 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 2ad6d82e..93756d2c 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 ef6fabe4..d957cc25 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 be49f157..8604fef0 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 0ed8fcd2..79f45ab0 100644 --- a/cmd/registry/main.go +++ b/cmd/registry/main.go @@ -10,16 +10,16 @@ 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/configuration" ctxu "github.com/docker/distribution/context" - "github.com/docker/distribution/registry" - _ "github.com/docker/distribution/storagedriver/filesystem" - _ "github.com/docker/distribution/storagedriver/inmemory" - _ "github.com/docker/distribution/storagedriver/s3" + _ "github.com/docker/distribution/registry/auth/silly" + _ "github.com/docker/distribution/registry/auth/token" + "github.com/docker/distribution/registry/handlers" + _ "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" - "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/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/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 c3adba80..20448efd 100644 --- a/auth/silly/access.go +++ b/registry/auth/silly/access.go @@ -12,8 +12,8 @@ import ( "net/http" "strings" - "github.com/docker/distribution/auth" ctxu "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" "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 44d66a4d..d579e878 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 2f1e3d6d..cb23eab6 100644 --- a/auth/token/accesscontroller.go +++ b/registry/auth/token/accesscontroller.go @@ -11,8 +11,8 @@ import ( "os" "strings" - "github.com/docker/distribution/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/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 6d67374e..166816ee 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 ab9fb896..791eb214 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/client/client.go b/registry/client/client.go similarity index 99% rename from client/client.go rename to registry/client/client.go index 6495da96..8e868c41 100644 --- a/client/client.go +++ b/registry/client/client.go @@ -9,9 +9,9 @@ import ( "regexp" "strconv" - "github.com/docker/distribution/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/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 diff --git a/registry/doc.go b/registry/doc.go new file mode 100644 index 00000000..5049dae3 --- /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 5e3bd72c..a14e93dc 100644 --- a/registry/api_test.go +++ b/registry/handlers/api_test.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "bytes" @@ -14,11 +14,11 @@ import ( "reflect" "testing" - "github.com/docker/distribution/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/app.go b/registry/handlers/app.go similarity index 97% rename from registry/app.go rename to registry/handlers/app.go index 817373f2..7a36309b 100644 --- a/registry/app.go +++ b/registry/handlers/app.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "fmt" @@ -7,14 +7,14 @@ import ( "os" "code.google.com/p/go-uuid/uuid" - "github.com/docker/distribution/api/v2" - "github.com/docker/distribution/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/storagedriver" - "github.com/docker/distribution/storagedriver/factory" + "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/gorilla/mux" "golang.org/x/net/context" ) diff --git a/registry/app_test.go b/registry/handlers/app_test.go similarity index 95% rename from registry/app_test.go rename to registry/handlers/app_test.go index 9b106575..158f5fc1 100644 --- a/registry/app_test.go +++ b/registry/handlers/app_test.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "encoding/json" @@ -7,11 +7,11 @@ import ( "net/url" "testing" - "github.com/docker/distribution/api/v2" - _ "github.com/docker/distribution/auth/silly" "github.com/docker/distribution/configuration" - "github.com/docker/distribution/storage" - "github.com/docker/distribution/storagedriver/inmemory" + "github.com/docker/distribution/registry/api/v2" + _ "github.com/docker/distribution/registry/auth/silly" + "github.com/docker/distribution/registry/storage" + "github.com/docker/distribution/registry/storage/driver/inmemory" "golang.org/x/net/context" ) 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 55794ee3..8727a3cd 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 dc563135..6cf10a25 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 95% rename from registry/context.go rename to registry/handlers/context.go index 7c4dbb02..0d3f44cc 100644 --- a/registry/context.go +++ b/registry/handlers/context.go @@ -1,13 +1,13 @@ -package registry +package handlers import ( "fmt" "net/http" - "github.com/docker/distribution/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/storage" "golang.org/x/net/context" ) 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 6bcb4ae8..f2879137 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 d2470087..e17ececa 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 5ad60f61..cce2cd49 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 96% rename from registry/images.go rename to registry/handlers/images.go index c44b0b21..e41f3682 100644 --- a/registry/images.go +++ b/registry/handlers/images.go @@ -1,15 +1,15 @@ -package registry +package handlers import ( "encoding/json" "fmt" "net/http" - "github.com/docker/distribution/api/v2" 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/api/v2" + "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/registry/layer.go b/registry/handlers/layer.go similarity index 93% rename from registry/layer.go rename to registry/handlers/layer.go index 10569465..105c2964 100644 --- a/registry/layer.go +++ b/registry/handlers/layer.go @@ -1,12 +1,12 @@ -package registry +package handlers import ( "net/http" - "github.com/docker/distribution/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/registry/layerupload.go b/registry/handlers/layerupload.go similarity index 98% rename from registry/layerupload.go rename to registry/handlers/layerupload.go index f30bb3aa..237644ea 100644 --- a/registry/layerupload.go +++ b/registry/handlers/layerupload.go @@ -1,4 +1,4 @@ -package registry +package handlers import ( "fmt" @@ -7,10 +7,10 @@ import ( "net/url" "os" - "github.com/docker/distribution/api/v2" ctxu "github.com/docker/distribution/context" "github.com/docker/distribution/digest" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/registry/tags.go b/registry/handlers/tags.go similarity index 91% rename from registry/tags.go rename to registry/handlers/tags.go index 1f745c6a..0a764693 100644 --- a/registry/tags.go +++ b/registry/handlers/tags.go @@ -1,11 +1,11 @@ -package registry +package handlers import ( "encoding/json" "net/http" - "github.com/docker/distribution/api/v2" - "github.com/docker/distribution/storage" + "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/storage" "github.com/gorilla/handlers" ) diff --git a/storage/blobstore.go b/registry/storage/blobstore.go similarity index 98% rename from storage/blobstore.go rename to registry/storage/blobstore.go index ac123f44..975df19f 100644 --- a/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/storage/cloudfrontlayerhandler.go b/registry/storage/cloudfrontlayerhandler.go similarity index 97% rename from storage/cloudfrontlayerhandler.go rename to registry/storage/cloudfrontlayerhandler.go index fa420cc7..f887895c 100644 --- a/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/storage/delegatelayerhandler.go b/registry/storage/delegatelayerhandler.go similarity index 97% rename from storage/delegatelayerhandler.go rename to registry/storage/delegatelayerhandler.go index 7ed6d87b..01354023 100644 --- a/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/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/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 b6c42f66..6ccbff40 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 170e20f8..a8fdf3e9 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 51fdf512..0365ba3c 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 ba3b7dfa..66d160f3 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 82e3d546..e5064029 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 e76b4bab..0e5aea75 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 08b203bd..8572de16 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 d3fdec57..f2c9c3ff 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 1034422e..a02ff23e 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 fab73113..daa823d7 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 e7ddd69e..dabb834d 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 6d7df2eb..4c6f1d4d 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 c9d4ccbe..eb9f08f4 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 0175e8ac..fb2003e1 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 c94ef8d6..dd8fb4a0 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 da127627..cfa3a48a 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/storage/filereader.go b/registry/storage/filereader.go similarity index 98% rename from storage/filereader.go rename to registry/storage/filereader.go index 9bc09afe..4cb2b331 100644 --- a/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/storage/filereader_test.go b/registry/storage/filereader_test.go similarity index 98% rename from storage/filereader_test.go rename to registry/storage/filereader_test.go index 53dd6c9a..7c554e8b 100644 --- a/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/storage/filewriter.go b/registry/storage/filewriter.go similarity index 98% rename from storage/filewriter.go rename to registry/storage/filewriter.go index 5037f160..cbf03704 100644 --- a/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/storage/filewriter_test.go b/registry/storage/filewriter_test.go similarity index 98% rename from storage/filewriter_test.go rename to registry/storage/filewriter_test.go index 2235462f..1a38a519 100644 --- a/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/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 98% rename from storage/layer_test.go rename to registry/storage/layer_test.go index c7d64b79..48982993 100644 --- a/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/storage/layerhandler.go b/registry/storage/layerhandler.go similarity index 95% rename from storage/layerhandler.go rename to registry/storage/layerhandler.go index 2755470e..5bcfeddd 100644 --- a/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/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 98% rename from storage/layerstore.go rename to registry/storage/layerstore.go index b6578792..e4760b4e 100644 --- a/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/storage/layerupload.go b/registry/storage/layerupload.go similarity index 98% rename from storage/layerupload.go rename to registry/storage/layerupload.go index 54860913..e6cf21a9 100644 --- a/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/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 98% rename from storage/manifeststore_test.go rename to registry/storage/manifeststore_test.go index 8284ce94..1fd02662 100644 --- a/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/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 d6f41ba0..217ee5bd 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 2d7bb112..99a06f02 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 97% rename from storage/notifications/listener_test.go rename to registry/storage/notifications/listener_test.go index 30d3f43f..b8d6a31e 100644 --- a/storage/notifications/listener_test.go +++ b/registry/storage/notifications/listener_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest" - "github.com/docker/distribution/storage" - "github.com/docker/distribution/storagedriver/inmemory" + "github.com/docker/distribution/registry/storage" + "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/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 96% rename from storage/registry.go rename to registry/storage/registry.go index ed865007..c4ca2f80 100644 --- a/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/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 97% rename from storage/tagstore.go rename to registry/storage/tagstore.go index f7b87a25..6ae3e5f8 100644 --- a/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.