forked from containerd/containerd
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace reference/docker for github.com/distribution/reference v0.5.0
The reference/docker package was a fork of github.com/distribution/distribution, which could not easily be used as a direct dependency, as it brought many other dependencies with it. The "reference' package has now moved to a separate repository, which means we can replace the local fork, and use the upstream implementation again. The new module was extracted from the distribution repository at commit: distribution/distribution@b9b1940 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Loading branch information
Showing
44 changed files
with
1,241 additions
and
2,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
Copyright The containerd Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package docker | ||
|
||
import "github.com/distribution/reference" | ||
|
||
// IsNameOnly returns true if reference only contains a repo name. | ||
// | ||
// Deprecated: use [reference.IsNameOnly]. | ||
func IsNameOnly(ref reference.Named) bool { | ||
return reference.IsNameOnly(ref) | ||
} | ||
|
||
// FamiliarName returns the familiar name string | ||
// for the given named, familiarizing if needed. | ||
// | ||
// Deprecated: use [reference.FamiliarName]. | ||
func FamiliarName(ref reference.Named) string { | ||
return reference.FamiliarName(ref) | ||
} | ||
|
||
// FamiliarString returns the familiar string representation | ||
// for the given reference, familiarizing if needed. | ||
// | ||
// Deprecated: use [reference.FamiliarString]. | ||
func FamiliarString(ref reference.Reference) string { | ||
return reference.FamiliarString(ref) | ||
} | ||
|
||
// FamiliarMatch reports whether ref matches the specified pattern. | ||
// See [path.Match] for supported patterns. | ||
// | ||
// Deprecated: use [reference.FamiliarMatch]. | ||
func FamiliarMatch(pattern string, ref reference.Reference) (bool, error) { | ||
return reference.FamiliarMatch(pattern, ref) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
Copyright The containerd Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package docker | ||
|
||
import ( | ||
"github.com/distribution/reference" | ||
) | ||
|
||
// ParseNormalizedNamed parses a string into a named reference | ||
// transforming a familiar name from Docker UI to a fully | ||
// qualified reference. If the value may be an identifier | ||
// use ParseAnyReference. | ||
// | ||
// Deprecated: use [reference.ParseNormalizedNamed]. | ||
func ParseNormalizedNamed(s string) (reference.Named, error) { | ||
return reference.ParseNormalizedNamed(s) | ||
} | ||
|
||
// ParseDockerRef normalizes the image reference following the docker convention, | ||
// which allows for references to contain both a tag and a digest. | ||
// | ||
// Deprecated: use [reference.ParseDockerRef]. | ||
func ParseDockerRef(ref string) (reference.Named, error) { | ||
return reference.ParseDockerRef(ref) | ||
} | ||
|
||
// TagNameOnly adds the default tag "latest" to a reference if it only has | ||
// a repo name. | ||
// | ||
// Deprecated: use [reference.TagNameOnly]. | ||
func TagNameOnly(ref reference.Named) reference.Named { | ||
return reference.TagNameOnly(ref) | ||
} | ||
|
||
// ParseAnyReference parses a reference string as a possible identifier, | ||
// full digest, or familiar name. | ||
// | ||
// Deprecated: use [reference.ParseAnyReference]. | ||
func ParseAnyReference(ref string) (reference.Reference, error) { | ||
return reference.ParseAnyReference(ref) | ||
} |
Oops, something went wrong.