Merge pull request #3225 from thaJeztah/fix_gomod
go.mod: change imports to github.com/distribution/distribution/v3
This commit is contained in:
commit
22c074842e
173 changed files with 527 additions and 527 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: src/github.com/docker/distribution
|
path: src/github.com/distribution/distribution
|
||||||
fetch-depth: 50
|
fetch-depth: 50
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
|
@ -39,7 +39,7 @@ jobs:
|
||||||
cd /tmp && go get -u github.com/vbatts/git-validation
|
cd /tmp && go get -u github.com/vbatts/git-validation
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ./src/github.com/docker/distribution
|
working-directory: ./src/github.com/distribution/distribution
|
||||||
run: |
|
run: |
|
||||||
DCO_VERBOSITY=-q script/validate/dco
|
DCO_VERBOSITY=-q script/validate/dco
|
||||||
GO111MODULE=on script/setup/install-dev-tools
|
GO111MODULE=on script/setup/install-dev-tools
|
||||||
|
@ -52,4 +52,4 @@ jobs:
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
directory: ./src/github.com/docker/distribution
|
directory: ./src/github.com/distribution/distribution
|
||||||
|
|
34
BUILDING.md
34
BUILDING.md
|
@ -29,7 +29,7 @@ environment.
|
||||||
If a Go development environment is setup, one can use `go get` to install the
|
If a Go development environment is setup, one can use `go get` to install the
|
||||||
`registry` command from the current latest:
|
`registry` command from the current latest:
|
||||||
|
|
||||||
go get github.com/docker/distribution/cmd/registry
|
go get github.com/distribution/distribution/cmd/registry
|
||||||
|
|
||||||
The above will install the source repository into the `GOPATH`.
|
The above will install the source repository into the `GOPATH`.
|
||||||
|
|
||||||
|
@ -43,17 +43,17 @@ The `registry`
|
||||||
binary can then be run with the following:
|
binary can then be run with the following:
|
||||||
|
|
||||||
$ $GOPATH/bin/registry --version
|
$ $GOPATH/bin/registry --version
|
||||||
$GOPATH/bin/registry github.com/docker/distribution v2.0.0-alpha.1+unknown
|
$GOPATH/bin/registry github.com/distribution/distribution v2.0.0-alpha.1+unknown
|
||||||
|
|
||||||
> __NOTE:__ While you do not need to use `go get` to checkout the distribution
|
> __NOTE:__ While you do not need to use `go get` to checkout the distribution
|
||||||
> project, for these build instructions to work, the project must be checked
|
> project, for these build instructions to work, the project must be checked
|
||||||
> out in the correct location in the `GOPATH`. This should almost always be
|
> out in the correct location in the `GOPATH`. This should almost always be
|
||||||
> `$GOPATH/src/github.com/docker/distribution`.
|
> `$GOPATH/src/github.com/distribution/distribution`.
|
||||||
|
|
||||||
The registry can be run with the default config using the following
|
The registry can be run with the default config using the following
|
||||||
incantation:
|
incantation:
|
||||||
|
|
||||||
$ $GOPATH/bin/registry serve $GOPATH/src/github.com/docker/distribution/cmd/registry/config-example.yml
|
$ $GOPATH/bin/registry serve $GOPATH/src/github.com/distribution/distribution/cmd/registry/config-example.yml
|
||||||
INFO[0000] endpoint local-5003 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
|
INFO[0000] endpoint local-5003 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
|
||||||
INFO[0000] endpoint local-8083 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
|
INFO[0000] endpoint local-8083 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
|
||||||
INFO[0000] listening on :5000 app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
|
INFO[0000] listening on :5000 app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
|
||||||
|
@ -64,7 +64,7 @@ If it is working, one should see the above log messages.
|
||||||
### Repeatable Builds
|
### Repeatable Builds
|
||||||
|
|
||||||
For the full development experience, one should `cd` into
|
For the full development experience, one should `cd` into
|
||||||
`$GOPATH/src/github.com/docker/distribution`. From there, the regular `go`
|
`$GOPATH/src/github.com/distribution/distribution`. From there, the regular `go`
|
||||||
commands, such as `go test`, should work per package (please see
|
commands, such as `go test`, should work per package (please see
|
||||||
[Developing](#developing) if they don't work).
|
[Developing](#developing) if they don't work).
|
||||||
|
|
||||||
|
@ -87,20 +87,20 @@ build:
|
||||||
github.com/docker/libtrust
|
github.com/docker/libtrust
|
||||||
...
|
...
|
||||||
github.com/yvasiyarov/gorelic
|
github.com/yvasiyarov/gorelic
|
||||||
github.com/docker/distribution/registry/handlers
|
github.com/distribution/distribution/registry/handlers
|
||||||
github.com/docker/distribution/cmd/registry
|
github.com/distribution/distribution/cmd/registry
|
||||||
+ test
|
+ test
|
||||||
...
|
...
|
||||||
ok github.com/docker/distribution/digest 7.875s
|
ok github.com/distribution/distribution/digest 7.875s
|
||||||
ok github.com/docker/distribution/manifest 0.028s
|
ok github.com/distribution/distribution/manifest 0.028s
|
||||||
ok github.com/docker/distribution/notifications 17.322s
|
ok github.com/distribution/distribution/notifications 17.322s
|
||||||
? github.com/docker/distribution/registry [no test files]
|
? github.com/distribution/distribution/registry [no test files]
|
||||||
ok github.com/docker/distribution/registry/api/v2 0.101s
|
ok github.com/distribution/distribution/registry/api/v2 0.101s
|
||||||
? github.com/docker/distribution/registry/auth [no test files]
|
? github.com/distribution/distribution/registry/auth [no test files]
|
||||||
ok github.com/docker/distribution/registry/auth/silly 0.011s
|
ok github.com/distribution/distribution/registry/auth/silly 0.011s
|
||||||
...
|
...
|
||||||
+ /Users/sday/go/src/github.com/docker/distribution/bin/registry
|
+ /Users/sday/go/src/github.com/distribution/distribution/bin/registry
|
||||||
+ /Users/sday/go/src/github.com/docker/distribution/bin/registry-api-descriptor-template
|
+ /Users/sday/go/src/github.com/distribution/distribution/bin/registry-api-descriptor-template
|
||||||
+ binaries
|
+ binaries
|
||||||
|
|
||||||
The above provides a repeatable build using the contents of the vendor
|
The above provides a repeatable build using the contents of the vendor
|
||||||
|
@ -109,7 +109,7 @@ testing and generating tagged binaries. We can verify this worked by running
|
||||||
the registry binary generated in the "./bin" directory:
|
the registry binary generated in the "./bin" directory:
|
||||||
|
|
||||||
$ ./bin/registry --version
|
$ ./bin/registry --version
|
||||||
./bin/registry github.com/docker/distribution v2.0.0-alpha.2-80-g16d8b2c.m
|
./bin/registry github.com/distribution/distribution v2.0.0-alpha.2-80-g16d8b2c.m
|
||||||
|
|
||||||
### Optional build tags
|
### Optional build tags
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ ARG GO_VERSION=1.13.8
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-alpine3.11 AS build
|
FROM golang:${GO_VERSION}-alpine3.11 AS build
|
||||||
|
|
||||||
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
|
ENV DISTRIBUTION_DIR /go/src/github.com/distribution/distribution
|
||||||
ENV BUILDTAGS include_oss include_gcs
|
ENV BUILDTAGS include_oss include_gcs
|
||||||
|
|
||||||
ARG GOOS=linux
|
ARG GOOS=linux
|
||||||
|
@ -24,7 +24,7 @@ RUN set -ex \
|
||||||
&& apk add --no-cache ca-certificates
|
&& apk add --no-cache ca-certificates
|
||||||
|
|
||||||
COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml
|
COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml
|
||||||
COPY --from=build /go/src/github.com/docker/distribution/bin/registry /bin/registry
|
COPY --from=build /go/src/github.com/distribution/distribution/bin/registry /bin/registry
|
||||||
VOLUME ["/var/lib/registry"]
|
VOLUME ["/var/lib/registry"]
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
ENTRYPOINT ["registry"]
|
ENTRYPOINT ["registry"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# docker/distribution Project Governance
|
# distribution/distribution Project Governance
|
||||||
|
|
||||||
Docker distribution abides by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
|
Docker distribution abides by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
|
||||||
|
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
|
||||||
REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
|
REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
|
||||||
|
|
||||||
|
|
||||||
PKG=github.com/docker/distribution
|
PKG=github.com/distribution/distribution/v3
|
||||||
|
|
||||||
# Project packages.
|
# Project packages.
|
||||||
PACKAGES=$(shell go list -tags "${BUILDTAGS}" ./... | grep -v /vendor/)
|
PACKAGES=$(shell go list -tags "${BUILDTAGS}" ./... | grep -v /vendor/)
|
||||||
|
|
2
blobs.go
2
blobs.go
|
@ -8,7 +8,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/docker/distribution/version"
|
"github.com/distribution/distribution/v3/version"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
|
|
||||||
_ "crypto/sha256"
|
_ "crypto/sha256"
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var spaceRegex = regexp.MustCompile(`\n\s*`)
|
var spaceRegex = regexp.MustCompile(`\n\s*`)
|
||||||
|
|
|
@ -3,21 +3,21 @@ package main
|
||||||
import (
|
import (
|
||||||
_ "net/http/pprof"
|
_ "net/http/pprof"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry"
|
"github.com/distribution/distribution/v3/registry"
|
||||||
_ "github.com/docker/distribution/registry/auth/htpasswd"
|
_ "github.com/distribution/distribution/v3/registry/auth/htpasswd"
|
||||||
_ "github.com/docker/distribution/registry/auth/silly"
|
_ "github.com/distribution/distribution/v3/registry/auth/silly"
|
||||||
_ "github.com/docker/distribution/registry/auth/token"
|
_ "github.com/distribution/distribution/v3/registry/auth/token"
|
||||||
_ "github.com/docker/distribution/registry/proxy"
|
_ "github.com/distribution/distribution/v3/registry/proxy"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/azure"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/azure"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/filesystem"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/filesystem"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/gcs"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/gcs"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/inmemory"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/inmemory"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/middleware/alicdn"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/alicdn"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/middleware/cloudfront"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/cloudfront"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/middleware/redirect"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/redirect"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/oss"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/oss"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/s3-aws"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/swift"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/swift"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/docker/distribution/uuid"
|
"github.com/distribution/distribution/v3/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
// instanceContext is a context that provides only an instance id. It is
|
// instanceContext is a context that provides only an instance id. It is
|
||||||
|
@ -21,7 +21,7 @@ func (ic *instanceContext) Value(key interface{}) interface{} {
|
||||||
// We want to lazy initialize the UUID such that we don't
|
// We want to lazy initialize the UUID such that we don't
|
||||||
// call a random generator from the package initialization
|
// call a random generator from the package initialization
|
||||||
// code. For various reasons random could not be available
|
// code. For various reasons random could not be available
|
||||||
// https://github.com/docker/distribution/issues/782
|
// https://github.com/distribution/distribution/issues/782
|
||||||
ic.id = uuid.Generate().String()
|
ic.id = uuid.Generate().String()
|
||||||
})
|
})
|
||||||
return ic.id
|
return ic.id
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/uuid"
|
"github.com/distribution/distribution/v3/uuid"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/uuid"
|
"github.com/distribution/distribution/v3/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WithTrace allocates a traced timing span in a new context. This allows a
|
// WithTrace allocates a traced timing span in a new context. This allows a
|
||||||
|
@ -33,7 +33,7 @@ import (
|
||||||
// If the function ran for roughly 1s, such a usage would emit a log message
|
// If the function ran for roughly 1s, such a usage would emit a log message
|
||||||
// as follows:
|
// as follows:
|
||||||
//
|
//
|
||||||
// INFO[0001] this will be the log message trace.duration=1.004575763s trace.func=github.com/docker/distribution/context.traceOperation trace.id=<id> ...
|
// INFO[0001] this will be the log message trace.duration=1.004575763s trace.func=github.com/distribution/distribution/context.traceOperation trace.id=<id> ...
|
||||||
//
|
//
|
||||||
// Notice that the function name is automatically resolved, along with the
|
// Notice that the function name is automatically resolved, along with the
|
||||||
// package and a trace id is emitted that can be linked with parent ids.
|
// package and a trace id is emitted that can be linked with parent ids.
|
||||||
|
|
|
@ -6,4 +6,4 @@ RUN apk add --no-cache git
|
||||||
|
|
||||||
ENV TMPDIR /var/lib/docker/tmp
|
ENV TMPDIR /var/lib/docker/tmp
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/docker/distribution/contrib/docker-integration
|
WORKDIR /go/src/github.com/distribution/distribution/contrib/docker-integration
|
||||||
|
|
|
@ -38,7 +38,7 @@ the [release page](https://github.com/docker/golem/releases/tag/v0.1).
|
||||||
Additionally golem can be run as a docker image requiring no additional
|
Additionally golem can be run as a docker image requiring no additional
|
||||||
installation.
|
installation.
|
||||||
|
|
||||||
`docker run --privileged -v "$GOPATH/src/github.com/docker/distribution/contrib/docker-integration:/test" -w /test distribution/golem golem -rundaemon .`
|
`docker run --privileged -v "$GOPATH/src/github.com/distribution/distribution/contrib/docker-integration:/test" -w /test distribution/golem golem -rundaemon .`
|
||||||
|
|
||||||
#### Golem custom images
|
#### Golem custom images
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -10,10 +10,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
_ "github.com/docker/distribution/registry/auth/htpasswd"
|
_ "github.com/distribution/distribution/v3/registry/auth/htpasswd"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
|
@ -12,9 +12,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
"github.com/docker/distribution/registry/auth/token"
|
"github.com/distribution/distribution/v3/registry/auth/token"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ $ docker run -d -p 5000:5000 --restart=always --name registry \
|
||||||
```
|
```
|
||||||
|
|
||||||
Use this
|
Use this
|
||||||
[example YAML file](https://github.com/docker/distribution/blob/master/cmd/registry/config-example.yml)
|
[example YAML file](https://github.com/distribution/distribution/blob/master/cmd/registry/config-example.yml)
|
||||||
as a starting point.
|
as a starting point.
|
||||||
|
|
||||||
## List of configuration options
|
## List of configuration options
|
||||||
|
@ -1206,7 +1206,7 @@ This example configures the registry instance to run on port `5000`, binding to
|
||||||
verbose.
|
verbose.
|
||||||
|
|
||||||
See
|
See
|
||||||
[config-example.yml](https://github.com/docker/distribution/blob/master/cmd/registry/config-example.yml)
|
[config-example.yml](https://github.com/distribution/distribution/blob/master/cmd/registry/config-example.yml)
|
||||||
for another simple configuration. Both examples are generally useful for local
|
for another simple configuration. Both examples are generally useful for local
|
||||||
development.
|
development.
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ keywords: registry, on-prem, images, tags, repository, distribution, JWT authent
|
||||||
|
|
||||||
# Docker Registry v2 Bearer token specification
|
# Docker Registry v2 Bearer token specification
|
||||||
|
|
||||||
This specification covers the `docker/distribution` implementation of the
|
This specification covers the `distribution/distribution` implementation of the
|
||||||
v2 Registry's authentication schema. Specifically, it describes the JSON
|
v2 Registry's authentication schema. Specifically, it describes the JSON
|
||||||
Web Token schema that `docker/distribution` has adopted to implement the
|
Web Token schema that `distribution/distribution` has adopted to implement the
|
||||||
client-opaque Bearer token issued by an authentication service and
|
client-opaque Bearer token issued by an authentication service and
|
||||||
understood by the registry.
|
understood by the registry.
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ alpha-numeric := /[a-z0-9]+/
|
||||||
separator := /[_.]|__|[-]*/
|
separator := /[_.]|__|[-]*/
|
||||||
```
|
```
|
||||||
Full reference grammar is defined
|
Full reference grammar is defined
|
||||||
[here](https://godoc.org/github.com/docker/distribution/reference). Currently
|
[here](https://godoc.org/github.com/distribution/distribution/reference). Currently
|
||||||
the scope name grammar is a subset of the reference grammar.
|
the scope name grammar is a subset of the reference grammar.
|
||||||
|
|
||||||
> **NOTE:** that the `resourcename` may contain one `:` due to a possible port
|
> **NOTE:** that the `resourcename` may contain one `:` due to a possible port
|
||||||
|
|
|
@ -6,7 +6,7 @@ published: false
|
||||||
|
|
||||||
This is a list of known implementations of the Distribution API spec.
|
This is a list of known implementations of the Distribution API spec.
|
||||||
|
|
||||||
## [Docker Distribution Registry](https://github.com/docker/distribution)
|
## [Docker Distribution Registry](https://github.com/distribution/distribution)
|
||||||
|
|
||||||
Docker distribution is the reference implementation of the distribution API
|
Docker distribution is the reference implementation of the distribution API
|
||||||
specification. It aims to fully implement the entire specification.
|
specification. It aims to fully implement the entire specification.
|
||||||
|
|
|
@ -12,7 +12,7 @@ release](https://github.com/docker/docker/commit/9f482a66ab37ec396ac61ed0c00d591
|
||||||
It is a provisional manifest to provide a compatibility with the [V1 Image
|
It is a provisional manifest to provide a compatibility with the [V1 Image
|
||||||
format](https://github.com/docker/docker/blob/master/image/spec/v1.md), as the
|
format](https://github.com/docker/docker/blob/master/image/spec/v1.md), as the
|
||||||
requirements are defined for the [V2 Schema 2
|
requirements are defined for the [V2 Schema 2
|
||||||
image](https://github.com/docker/distribution/pull/62).
|
image](https://github.com/distribution/distribution/pull/62).
|
||||||
|
|
||||||
|
|
||||||
Image manifests describe the various constituents of a docker image. Image
|
Image manifests describe the various constituents of a docker image. Image
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/docker/distribution
|
module github.com/distribution/distribution/v3
|
||||||
|
|
||||||
go 1.12
|
go 1.12
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/distribution/health"
|
"github.com/distribution/distribution/v3/health"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution/health"
|
"github.com/distribution/distribution/v3/health"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestGETDownHandlerDoesNotChangeStatus ensures that calling the endpoint
|
// TestGETDownHandlerDoesNotChangeStatus ensures that calling the endpoint
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/health"
|
"github.com/distribution/distribution/v3/health"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FileChecker checks the existence of a file and returns an error
|
// FileChecker checks the existence of a file and returns an error
|
||||||
|
|
|
@ -17,14 +17,14 @@
|
||||||
//
|
//
|
||||||
// To install health, just import it in your application:
|
// To install health, just import it in your application:
|
||||||
//
|
//
|
||||||
// import "github.com/docker/distribution/health"
|
// import "github.com/distribution/distribution/v3/health"
|
||||||
//
|
//
|
||||||
// You can also (optionally) import "health/api" that will add two convenience
|
// You can also (optionally) import "health/api" that will add two convenience
|
||||||
// endpoints: "/debug/health/down" and "/debug/health/up". These endpoints add
|
// endpoints: "/debug/health/down" and "/debug/health/up". These endpoints add
|
||||||
// "manual" checks that allow the service to quickly be brought in/out of
|
// "manual" checks that allow the service to quickly be brought in/out of
|
||||||
// rotation.
|
// rotation.
|
||||||
//
|
//
|
||||||
// import _ "github.com/docker/distribution/health/api"
|
// import _ "github.com/distribution/distribution/v3/health/api"
|
||||||
//
|
//
|
||||||
// # curl localhost:5001/debug/health
|
// # curl localhost:5001/debug/health
|
||||||
// {}
|
// {}
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
// You can also use the predefined Checkers that come included with the health
|
// You can also use the predefined Checkers that come included with the health
|
||||||
// package. First, import the checks:
|
// package. First, import the checks:
|
||||||
//
|
//
|
||||||
// import "github.com/docker/distribution/health/checks
|
// import "github.com/distribution/distribution/v3/health/checks
|
||||||
//
|
//
|
||||||
// After that you can make use of any of the provided checks. An example of
|
// After that you can make use of any of the provided checks. An example of
|
||||||
// using a `FileChecker` to take the application out of rotation if a certain
|
// using a `FileChecker` to take the application out of rotation if a certain
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A Registry is a collection of checks. Most applications will use the global
|
// A Registry is a collection of checks. Most applications will use the global
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ func TestManifestList(t *testing.T) {
|
||||||
// TODO (mikebrow): add annotations on the manifest list (index) and support for
|
// TODO (mikebrow): add annotations on the manifest list (index) and support for
|
||||||
// empty platform structs (move to Platform *Platform `json:"platform,omitempty"`
|
// empty platform structs (move to Platform *Platform `json:"platform,omitempty"`
|
||||||
// from current Platform PlatformSpec `json:"platform"`) in the manifest descriptor.
|
// from current Platform PlatformSpec `json:"platform"`) in the manifest descriptor.
|
||||||
// Requires changes to docker/distribution/manifest/manifestlist.ManifestList and .ManifestDescriptor
|
// Requires changes to distribution/distribution/manifest/manifestlist.ManifestList and .ManifestDescriptor
|
||||||
// and associated serialization APIs in manifestlist.go. Or split the OCI index and
|
// and associated serialization APIs in manifestlist.go. Or split the OCI index and
|
||||||
// docker manifest list implementations, which would require a lot of refactoring.
|
// docker manifest list implementations, which would require a lot of refactoring.
|
||||||
var expectedOCIImageIndexSerialization = []byte(`{
|
var expectedOCIImageIndexSerialization = []byte(`{
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,9 +8,9 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,9 +3,9 @@ package schema1
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@ package schema2
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
)
|
)
|
||||||
|
|
||||||
var expectedManifestSerialization = []byte(`{
|
var expectedManifestSerialization = []byte(`{
|
||||||
|
|
|
@ -4,10 +4,10 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/uuid"
|
"github.com/distribution/distribution/v3/uuid"
|
||||||
events "github.com/docker/go-events"
|
events "github.com/docker/go-events"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,11 +3,11 @@ package notifications
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest/schema1"
|
"github.com/distribution/distribution/v3/manifest/schema1"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/uuid"
|
"github.com/distribution/distribution/v3/uuid"
|
||||||
events "github.com/docker/go-events"
|
events "github.com/docker/go-events"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/configuration"
|
"github.com/distribution/distribution/v3/configuration"
|
||||||
events "github.com/docker/go-events"
|
events "github.com/docker/go-events"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
events "github.com/docker/go-events"
|
events "github.com/docker/go-events"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/manifest/schema1"
|
"github.com/distribution/distribution/v3/manifest/schema1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestEventJSONFormat provides silly test to detect if the event format or
|
// TestEventJSONFormat provides silly test to detect if the event format or
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution/manifest/schema1"
|
"github.com/distribution/distribution/v3/manifest/schema1"
|
||||||
events "github.com/docker/go-events"
|
events "github.com/docker/go-events"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
|
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,15 +5,15 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/docker/distribution/manifest/schema1"
|
"github.com/distribution/distribution/v3/manifest/schema1"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/storage"
|
"github.com/distribution/distribution/v3/registry/storage"
|
||||||
"github.com/docker/distribution/registry/storage/cache/memory"
|
"github.com/distribution/distribution/v3/registry/storage/cache/memory"
|
||||||
"github.com/docker/distribution/registry/storage/driver/inmemory"
|
"github.com/distribution/distribution/v3/registry/storage/driver/inmemory"
|
||||||
"github.com/docker/distribution/testutil"
|
"github.com/distribution/distribution/v3/testutil"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
prometheus "github.com/docker/distribution/metrics"
|
prometheus "github.com/distribution/distribution/v3/metrics"
|
||||||
events "github.com/docker/go-events"
|
events "github.com/docker/go-events"
|
||||||
"github.com/docker/go-metrics"
|
"github.com/docker/go-metrics"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/docker/distribution/digestset"
|
"github.com/distribution/distribution/v3/digestset"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution/digestset"
|
"github.com/distribution/distribution/v3/digestset"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ func TestReferenceParse(t *testing.T) {
|
||||||
err: ErrNameContainsUppercase,
|
err: ErrNameContainsUppercase,
|
||||||
},
|
},
|
||||||
// FIXME "Uppercase" is incorrectly handled as a domain-name here, therefore passes.
|
// FIXME "Uppercase" is incorrectly handled as a domain-name here, therefore passes.
|
||||||
// See https://github.com/docker/distribution/pull/1778, and https://github.com/docker/docker/pull/20175
|
// See https://github.com/distribution/distribution/pull/1778, and https://github.com/docker/docker/pull/20175
|
||||||
//{
|
//{
|
||||||
// input: "Uppercase/lowercase:tag",
|
// input: "Uppercase/lowercase:tag",
|
||||||
// err: ErrNameContainsUppercase,
|
// err: ErrNameContainsUppercase,
|
||||||
|
|
|
@ -3,7 +3,7 @@ package distribution
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Scope defines the set of items that match a namespace.
|
// Scope defines the set of items that match a namespace.
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package v2
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
)
|
)
|
||||||
|
|
||||||
const errGroup = "registry.api.v2"
|
const errGroup = "registry.api.v2"
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
)
|
)
|
||||||
|
|
||||||
type urlBuilderTestCase struct {
|
type urlBuilderTestCase struct {
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
type accessController struct {
|
type accessController struct {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBasicAccessController(t *testing.T) {
|
func TestBasicAccessController(t *testing.T) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// accessController provides a simple implementation of auth.AccessController
|
// accessController provides a simple implementation of auth.AccessController
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSillyAccessController(t *testing.T) {
|
func TestSillyAccessController(t *testing.T) {
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/client"
|
"github.com/distribution/distribution/v3/registry/client"
|
||||||
"github.com/docker/distribution/registry/client/auth/challenge"
|
"github.com/distribution/distribution/v3/registry/client/auth/challenge"
|
||||||
"github.com/docker/distribution/registry/client/transport"
|
"github.com/distribution/distribution/v3/registry/client/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/client/auth/challenge"
|
"github.com/distribution/distribution/v3/registry/client/auth/challenge"
|
||||||
"github.com/docker/distribution/registry/client/transport"
|
"github.com/distribution/distribution/v3/registry/client/transport"
|
||||||
"github.com/docker/distribution/testutil"
|
"github.com/distribution/distribution/v3/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// An implementation of clock for providing fake time data.
|
// An implementation of clock for providing fake time data.
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
type httpBlobUpload struct {
|
type httpBlobUpload struct {
|
||||||
|
|
|
@ -6,10 +6,10 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/testutil"
|
"github.com/distribution/distribution/v3/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Test implements distribution.BlobWriter
|
// Test implements distribution.BlobWriter
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
"github.com/docker/distribution/registry/client/auth/challenge"
|
"github.com/distribution/distribution/v3/registry/client/auth/challenge"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrNoErrorsInBody is returned when an HTTP response body parses to an empty
|
// ErrNoErrorsInBody is returned when an HTTP response body parses to an empty
|
||||||
|
|
|
@ -14,12 +14,12 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/registry/client/transport"
|
"github.com/distribution/distribution/v3/registry/client/transport"
|
||||||
"github.com/docker/distribution/registry/storage/cache"
|
"github.com/distribution/distribution/v3/registry/storage/cache"
|
||||||
"github.com/docker/distribution/registry/storage/cache/memory"
|
"github.com/distribution/distribution/v3/registry/storage/cache/memory"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -17,15 +17,15 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/docker/distribution/manifest/schema1"
|
"github.com/distribution/distribution/v3/manifest/schema1"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/testutil"
|
"github.com/distribution/distribution/v3/testutil"
|
||||||
"github.com/docker/distribution/uuid"
|
"github.com/distribution/distribution/v3/uuid"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -20,19 +20,19 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/configuration"
|
"github.com/distribution/distribution/v3/configuration"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/docker/distribution/manifest/manifestlist"
|
"github.com/distribution/distribution/v3/manifest/manifestlist"
|
||||||
"github.com/docker/distribution/manifest/schema1"
|
"github.com/distribution/distribution/v3/manifest/schema1"
|
||||||
"github.com/docker/distribution/manifest/schema2"
|
"github.com/distribution/distribution/v3/manifest/schema2"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
storagedriver "github.com/docker/distribution/registry/storage/driver"
|
storagedriver "github.com/distribution/distribution/v3/registry/storage/driver"
|
||||||
"github.com/docker/distribution/registry/storage/driver/factory"
|
"github.com/distribution/distribution/v3/registry/storage/driver/factory"
|
||||||
_ "github.com/docker/distribution/registry/storage/driver/testdriver"
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/testdriver"
|
||||||
"github.com/docker/distribution/testutil"
|
"github.com/distribution/distribution/v3/testutil"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
|
|
|
@ -15,27 +15,27 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/configuration"
|
"github.com/distribution/distribution/v3/configuration"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/health"
|
"github.com/distribution/distribution/v3/health"
|
||||||
"github.com/docker/distribution/health/checks"
|
"github.com/distribution/distribution/v3/health/checks"
|
||||||
prometheus "github.com/docker/distribution/metrics"
|
prometheus "github.com/distribution/distribution/v3/metrics"
|
||||||
"github.com/docker/distribution/notifications"
|
"github.com/distribution/distribution/v3/notifications"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
registrymiddleware "github.com/docker/distribution/registry/middleware/registry"
|
registrymiddleware "github.com/distribution/distribution/v3/registry/middleware/registry"
|
||||||
repositorymiddleware "github.com/docker/distribution/registry/middleware/repository"
|
repositorymiddleware "github.com/distribution/distribution/v3/registry/middleware/repository"
|
||||||
"github.com/docker/distribution/registry/proxy"
|
"github.com/distribution/distribution/v3/registry/proxy"
|
||||||
"github.com/docker/distribution/registry/storage"
|
"github.com/distribution/distribution/v3/registry/storage"
|
||||||
memorycache "github.com/docker/distribution/registry/storage/cache/memory"
|
memorycache "github.com/distribution/distribution/v3/registry/storage/cache/memory"
|
||||||
rediscache "github.com/docker/distribution/registry/storage/cache/redis"
|
rediscache "github.com/distribution/distribution/v3/registry/storage/cache/redis"
|
||||||
storagedriver "github.com/docker/distribution/registry/storage/driver"
|
storagedriver "github.com/distribution/distribution/v3/registry/storage/driver"
|
||||||
"github.com/docker/distribution/registry/storage/driver/factory"
|
"github.com/distribution/distribution/v3/registry/storage/driver/factory"
|
||||||
storagemiddleware "github.com/docker/distribution/registry/storage/driver/middleware"
|
storagemiddleware "github.com/distribution/distribution/v3/registry/storage/driver/middleware"
|
||||||
"github.com/docker/distribution/version"
|
"github.com/distribution/distribution/v3/version"
|
||||||
events "github.com/docker/go-events"
|
events "github.com/docker/go-events"
|
||||||
"github.com/docker/go-metrics"
|
"github.com/docker/go-metrics"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
|
|
|
@ -8,15 +8,15 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution/configuration"
|
"github.com/distribution/distribution/v3/configuration"
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
_ "github.com/docker/distribution/registry/auth/silly"
|
_ "github.com/distribution/distribution/v3/registry/auth/silly"
|
||||||
"github.com/docker/distribution/registry/storage"
|
"github.com/distribution/distribution/v3/registry/storage"
|
||||||
memorycache "github.com/docker/distribution/registry/storage/cache/memory"
|
memorycache "github.com/distribution/distribution/v3/registry/storage/cache/memory"
|
||||||
"github.com/docker/distribution/registry/storage/driver/testdriver"
|
"github.com/distribution/distribution/v3/registry/storage/driver/testdriver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestAppDispatcher builds an application with a test dispatcher and ensures
|
// TestAppDispatcher builds an application with a test dispatcher and ensures
|
||||||
|
|
|
@ -3,10 +3,10 @@ package handlers
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,12 +5,12 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/registry/storage"
|
"github.com/distribution/distribution/v3/registry/storage"
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
"github.com/docker/distribution/registry/storage/driver"
|
"github.com/distribution/distribution/v3/registry/storage/driver"
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/configuration"
|
"github.com/distribution/distribution/v3/configuration"
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/health"
|
"github.com/distribution/distribution/v3/health"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFileHealthCheck(t *testing.T) {
|
func TestFileHealthCheck(t *testing.T) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// closeResources closes all the provided resources after running the target
|
// closeResources closes all the provided resources after running the target
|
||||||
|
|
|
@ -7,16 +7,16 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/manifest/manifestlist"
|
"github.com/distribution/distribution/v3/manifest/manifestlist"
|
||||||
"github.com/docker/distribution/manifest/ocischema"
|
"github.com/distribution/distribution/v3/manifest/ocischema"
|
||||||
"github.com/docker/distribution/manifest/schema1"
|
"github.com/distribution/distribution/v3/manifest/schema1"
|
||||||
"github.com/docker/distribution/manifest/schema2"
|
"github.com/distribution/distribution/v3/manifest/schema2"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/docker/distribution/registry/auth"
|
"github.com/distribution/distribution/v3/registry/auth"
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/distribution/distribution/v3/registry/api/errcode"
|
||||||
v2 "github.com/docker/distribution/registry/api/v2"
|
v2 "github.com/distribution/distribution/v3/registry/api/v2"
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/registry/storage"
|
"github.com/distribution/distribution/v3/registry/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InitFunc is the type of a RegistryMiddleware factory function and is
|
// InitFunc is the type of a RegistryMiddleware factory function and is
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InitFunc is the type of a RepositoryMiddleware factory function and is
|
// InitFunc is the type of a RepositoryMiddleware factory function and is
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/registry/client/auth"
|
"github.com/distribution/distribution/v3/registry/client/auth"
|
||||||
"github.com/docker/distribution/registry/client/auth/challenge"
|
"github.com/distribution/distribution/v3/registry/client/auth/challenge"
|
||||||
)
|
)
|
||||||
|
|
||||||
const challengeHeader = "Docker-Distribution-Api-Version"
|
const challengeHeader = "Docker-Distribution-Api-Version"
|
||||||
|
|
|
@ -7,10 +7,10 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/proxy/scheduler"
|
"github.com/distribution/distribution/v3/registry/proxy/scheduler"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -10,13 +10,13 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/proxy/scheduler"
|
"github.com/distribution/distribution/v3/registry/proxy/scheduler"
|
||||||
"github.com/docker/distribution/registry/storage"
|
"github.com/distribution/distribution/v3/registry/storage"
|
||||||
"github.com/docker/distribution/registry/storage/cache/memory"
|
"github.com/distribution/distribution/v3/registry/storage/cache/memory"
|
||||||
"github.com/docker/distribution/registry/storage/driver/filesystem"
|
"github.com/distribution/distribution/v3/registry/storage/driver/filesystem"
|
||||||
"github.com/docker/distribution/registry/storage/driver/inmemory"
|
"github.com/distribution/distribution/v3/registry/storage/driver/inmemory"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/proxy/scheduler"
|
"github.com/distribution/distribution/v3/registry/proxy/scheduler"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,17 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/manifest"
|
"github.com/distribution/distribution/v3/manifest"
|
||||||
"github.com/docker/distribution/manifest/schema1"
|
"github.com/distribution/distribution/v3/manifest/schema1"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/client/auth"
|
"github.com/distribution/distribution/v3/registry/client/auth"
|
||||||
"github.com/docker/distribution/registry/client/auth/challenge"
|
"github.com/distribution/distribution/v3/registry/client/auth/challenge"
|
||||||
"github.com/docker/distribution/registry/proxy/scheduler"
|
"github.com/distribution/distribution/v3/registry/proxy/scheduler"
|
||||||
"github.com/docker/distribution/registry/storage"
|
"github.com/distribution/distribution/v3/registry/storage"
|
||||||
"github.com/docker/distribution/registry/storage/cache/memory"
|
"github.com/distribution/distribution/v3/registry/storage/cache/memory"
|
||||||
"github.com/docker/distribution/registry/storage/driver/inmemory"
|
"github.com/distribution/distribution/v3/registry/storage/driver/inmemory"
|
||||||
"github.com/docker/distribution/testutil"
|
"github.com/distribution/distribution/v3/testutil"
|
||||||
"github.com/docker/libtrust"
|
"github.com/docker/libtrust"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,17 +7,17 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
"github.com/docker/distribution/configuration"
|
"github.com/distribution/distribution/v3/configuration"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/client"
|
"github.com/distribution/distribution/v3/registry/client"
|
||||||
"github.com/docker/distribution/registry/client/auth"
|
"github.com/distribution/distribution/v3/registry/client/auth"
|
||||||
"github.com/docker/distribution/registry/client/auth/challenge"
|
"github.com/distribution/distribution/v3/registry/client/auth/challenge"
|
||||||
"github.com/docker/distribution/registry/client/transport"
|
"github.com/distribution/distribution/v3/registry/client/transport"
|
||||||
"github.com/docker/distribution/registry/proxy/scheduler"
|
"github.com/distribution/distribution/v3/registry/proxy/scheduler"
|
||||||
"github.com/docker/distribution/registry/storage"
|
"github.com/distribution/distribution/v3/registry/storage"
|
||||||
"github.com/docker/distribution/registry/storage/driver"
|
"github.com/distribution/distribution/v3/registry/storage/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// proxyingRegistry fetches content from a remote registry and caches it locally
|
// proxyingRegistry fetches content from a remote registry and caches it locally
|
||||||
|
|
|
@ -3,7 +3,7 @@ package proxy
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
// proxyTagService supports local and remote lookup of tags.
|
// proxyTagService supports local and remote lookup of tags.
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/distribution"
|
"github.com/distribution/distribution/v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockTagStore struct {
|
type mockTagStore struct {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/storage/driver"
|
"github.com/distribution/distribution/v3/registry/storage/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// onTTLExpiryFunc is called when a repository's TTL expires
|
// onTTLExpiryFunc is called when a repository's TTL expires
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/distribution/context"
|
"github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/distribution/v3/reference"
|
||||||
"github.com/docker/distribution/registry/storage/driver/inmemory"
|
"github.com/distribution/distribution/v3/registry/storage/driver/inmemory"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testRefs(t *testing.T) (reference.Reference, reference.Reference, reference.Reference) {
|
func testRefs(t *testing.T) (reference.Reference, reference.Reference, reference.Reference) {
|
||||||
|
|
|
@ -24,13 +24,13 @@ import (
|
||||||
"golang.org/x/crypto/acme"
|
"golang.org/x/crypto/acme"
|
||||||
"golang.org/x/crypto/acme/autocert"
|
"golang.org/x/crypto/acme/autocert"
|
||||||
|
|
||||||
"github.com/docker/distribution/configuration"
|
"github.com/distribution/distribution/v3/configuration"
|
||||||
dcontext "github.com/docker/distribution/context"
|
dcontext "github.com/distribution/distribution/v3/context"
|
||||||
"github.com/docker/distribution/health"
|
"github.com/distribution/distribution/v3/health"
|
||||||
"github.com/docker/distribution/registry/handlers"
|
"github.com/distribution/distribution/v3/registry/handlers"
|
||||||
"github.com/docker/distribution/registry/listener"
|
"github.com/distribution/distribution/v3/registry/listener"
|
||||||
"github.com/docker/distribution/uuid"
|
"github.com/distribution/distribution/v3/uuid"
|
||||||
"github.com/docker/distribution/version"
|
"github.com/distribution/distribution/v3/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
// this channel gets notified when process receives signal. It is global to ease unit testing
|
// this channel gets notified when process receives signal. It is global to ease unit testing
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue