Update vendor distribution

Distribution client change for class in resource

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit d1f5e0f7a6)
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Derek McGowan 2016-11-15 17:31:54 -08:00 committed by Victor Vieux
parent 674cf8233d
commit 9ecbaa77ae
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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