mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
This field indicates whether a repository is an official image (Docker Library / Docker Official Images). This information is deducted from the image reference, and not used anywhere, other than in tests. The `RepositoryInfo` and `IndexInfo` types were originally introduced in568f86eb18, with their fields documented in4fcb9ac40c. At the time, the `Official` field was only used for `docker push` to produce a custom error message if someone would attempt to push an official image to docker hub (assuming nobody would be able to do so);6870bde584/api/client/commands.go (L1184-L1194)Before that commit, the condition for this error message was based on the given image reference directly;b370acd679b370acd679/commands.go (L421-L428)This patch deprecates the field, because it's not used, and removes tests related to it. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
25 lines
909 B
Go
25 lines
909 B
Go
package registry // import "github.com/docker/docker/registry"
|
|
|
|
import (
|
|
"github.com/distribution/reference"
|
|
"github.com/docker/docker/api/types/registry"
|
|
)
|
|
|
|
// RepositoryInfo describes a repository
|
|
type RepositoryInfo struct {
|
|
Name reference.Named
|
|
// Index points to registry information
|
|
Index *registry.IndexInfo
|
|
// Official indicates whether the repository is considered official.
|
|
// If the registry is official, and the normalized name does not
|
|
// contain a '/' (e.g. "foo"), then it is considered an official repo.
|
|
//
|
|
// Deprecated: this field is no longer used and will be removed in the next release. The information captured in this field can be obtained from the [Name] field instead.
|
|
Official bool
|
|
// Class represents the class of the repository, such as "plugin"
|
|
// or "image".
|
|
//
|
|
// Deprecated: this field is no longer used, and will be removed in the next release.
|
|
Class string
|
|
}
|