Files
skopeo/types/types.go
Antonio Murdaca 41329ca504 attempt abstract interface
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-16 11:46:39 +01:00

38 lines
913 B
Go

package types
import (
containerTypes "github.com/docker/engine-api/types/container"
)
const (
DockerPrefix = "docker://"
)
type Registry interface {
Images() []Image
Image(ref string) Image // ref == image name w/o registry part
Lookup(term string) []Image // docker registry v1 only AFAICT
}
type Image interface {
Layers(layers []string) error
Manifest(version string) (ImageManifest, error)
RawManifest(version string) ([]byte, error)
DockerTar() ([]byte, error) // ???
}
type ImageManifest struct {
Tag string
Digest string
RepoTags []string
Comment string
Created string
ContainerConfig *containerTypes.Config // remove docker/docker code
DockerVersion string
Author string
Config *containerTypes.Config // remove docker/docker code
Architecture string
Os string
Layers []string // ???
}