diff --git a/api/errors/descriptors.go b/api/v2/descriptors.go similarity index 99% rename from api/errors/descriptors.go rename to api/v2/descriptors.go index d2f0f7da..77528d72 100644 --- a/api/errors/descriptors.go +++ b/api/v2/descriptors.go @@ -1,4 +1,4 @@ -package errors +package v2 import "net/http" diff --git a/api/v2/doc.go b/api/v2/doc.go new file mode 100644 index 00000000..cde01195 --- /dev/null +++ b/api/v2/doc.go @@ -0,0 +1,9 @@ +// Package v2 describes routes, urls and the error codes used in the Docker +// Registry JSON HTTP API V2. In addition to declarations, descriptors are +// provided for routes and error codes that can be used for implementation and +// automatically generating documentation. +// +// Definitions here are considered to be locked down for the V2 registry api. +// Any changes must be considered carefully and should not proceed without a +// change proposal in docker core. +package v2 diff --git a/api/errors/errors.go b/api/v2/errors.go similarity index 91% rename from api/errors/errors.go rename to api/v2/errors.go index b6e64e2a..8c85d3a9 100644 --- a/api/errors/errors.go +++ b/api/v2/errors.go @@ -1,12 +1,4 @@ -// Package errors describes the error codes that may be returned via the -// Docker Registry JSON HTTP API V2. In addition to declaractions, -// descriptions about the error codes and the conditions causing them are -// avialable in detail. -// -// Error definitions here are considered to be locked down for the V2 registry -// api. Any changes must be considered carefully and should not proceed -// without a change proposal in docker core. -package errors +package v2 import ( "fmt" diff --git a/api/errors/errors_test.go b/api/v2/errors_test.go similarity index 99% rename from api/errors/errors_test.go rename to api/v2/errors_test.go index 2f5c69e0..d2fc091a 100644 --- a/api/errors/errors_test.go +++ b/api/v2/errors_test.go @@ -1,4 +1,4 @@ -package errors +package v2 import ( "encoding/json" diff --git a/api/urls/routes.go b/api/v2/routes.go similarity index 99% rename from api/urls/routes.go rename to api/v2/routes.go index 79138a4a..7ebe61d6 100644 --- a/api/urls/routes.go +++ b/api/v2/routes.go @@ -1,4 +1,4 @@ -package urls +package v2 import ( "github.com/docker/docker-registry/common" diff --git a/api/urls/routes_test.go b/api/v2/routes_test.go similarity index 99% rename from api/urls/routes_test.go rename to api/v2/routes_test.go index f2e95270..9969ebcc 100644 --- a/api/urls/routes_test.go +++ b/api/v2/routes_test.go @@ -1,4 +1,4 @@ -package urls +package v2 import ( "encoding/json" diff --git a/api/urls/urls.go b/api/v2/urls.go similarity index 99% rename from api/urls/urls.go rename to api/v2/urls.go index 86306c67..15d65484 100644 --- a/api/urls/urls.go +++ b/api/v2/urls.go @@ -1,4 +1,4 @@ -package urls +package v2 import ( "net/http"