Documentation ¶
Index ¶
- Variables
- func AddImageNames(store storage.Store, image *storage.Image, addNames []string) error
- func ExpandNames(names []string) ([]string, error)
- func FindImage(store storage.Store, image string) (*storage.Image, error)
- func GetFailureCause(err, defaultError error) error
- func GetLocalTime(localTime time.Time) time.Time
- func ResolveName(name string, firstRegistry string, sc *types.SystemContext, ...) []string
Constants ¶
This section is empty.
Variables ¶
var ( // RegistryDefaultPathPrefix contains a per-registry listing of default prefixes // to prepend to image names that only contain a single path component. RegistryDefaultPathPrefix = map[string]string{ "index.docker.io": "library", "docker.io": "library", } // Transports contains the possible transports used for images Transports = map[string]string{ dockerarchive.Transport.Name(): "", ociarchive.Transport.Name(): "", directory.Transport.Name(): "", tarball.Transport.Name(): "", } // DockerArchive is the transport we prepend to an image name // when saving to docker-archive DockerArchive = dockerarchive.Transport.Name() // OCIArchive is the transport we prepend to an image name // when saving to oci-archive OCIArchive = ociarchive.Transport.Name() // DirTransport is the transport for pushing and pulling // images to and from a directory DirTransport = directory.Transport.Name() // TarballTransport is the transport for importing a tar archive // and creating a filesystem image TarballTransport = tarball.Transport.Name() )
Functions ¶
func AddImageNames ¶
AddImageNames adds the specified names to the specified image.
func ExpandNames ¶
ExpandNames takes unqualified names, parses them as image names, and returns the fully expanded result, including a tag. Names which don't include a registry name will be marked for the most-preferred registry (i.e., the first one in our configuration).
func GetFailureCause ¶
GetFailureCause checks the type of the error "err" and returns a new error message that reflects the reason of the failure. In case err type is not a familiar one the error "defaultError" is returned.
func GetLocalTime ¶
GetLocalTime discover the UTC offset and then add that to the passed in time to arrive at the local time.
func ResolveName ¶
func ResolveName(name string, firstRegistry string, sc *types.SystemContext, store storage.Store) []string
ResolveName checks if name is a valid image name, and if that name doesn't include a domain portion, returns a list of the names which it might correspond to in the registries.
Types ¶
This section is empty.