From 9ecbaa77ae8e16b5d481c3c3e666fdae8a77b916 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Tue, 15 Nov 2016 17:31:54 -0800 Subject: [PATCH] Update vendor distribution Distribution client change for class in resource Signed-off-by: Derek McGowan (github: dmcgowan) (cherry picked from commit d1f5e0f7a68d8a43931b834ce342830956bdac32) Signed-off-by: Victor Vieux --- vendor.conf | 2 +- .../docker/distribution/registry/client/auth/session.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/vendor.conf b/vendor.conf index 5d272a83e1..d59b72d9c3 100644 --- a/vendor.conf +++ b/vendor.conf @@ -44,7 +44,7 @@ github.com/boltdb/bolt fff57c100f4dea1905678da7e90d92429dff2904 github.com/miekg/dns 75e6e86cc601825c5dbcd4e0c209eab180997cd7 # get graph and distribution packages -github.com/docker/distribution d22e09a6686c32be8c17b684b639da4b90efe320 +github.com/docker/distribution a6bf3dd064f15598166bca2d66a9962a9555139e github.com/vbatts/tar-split v0.10.1 # get go-zfs packages diff --git a/vendor/github.com/docker/distribution/registry/client/auth/session.go b/vendor/github.com/docker/distribution/registry/client/auth/session.go index ffc3384b19..d6d884ffd1 100644 --- a/vendor/github.com/docker/distribution/registry/client/auth/session.go +++ b/vendor/github.com/docker/distribution/registry/client/auth/session.go @@ -147,13 +147,18 @@ type Scope interface { // to a repository. type RepositoryScope struct { Repository string + Class string Actions []string } // String returns the string representation of the repository // using the scope grammar func (rs RepositoryScope) String() string { - return fmt.Sprintf("repository:%s:%s", rs.Repository, strings.Join(rs.Actions, ",")) + repoType := "repository" + if rs.Class != "" { + repoType = fmt.Sprintf("%s(%s)", repoType, rs.Class) + } + return fmt.Sprintf("%s:%s:%s", repoType, rs.Repository, strings.Join(rs.Actions, ",")) } // RegistryScope represents a token scope for access