types: more on interfaces

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2016-03-16 17:54:24 +01:00
parent b97d7fc68f
commit d8fbf24c25

View File

@ -9,12 +9,18 @@ const (
)
type Registry interface {
Images() []Image
Image(ref string) Image // ref == image name w/o registry part
Repositories() []Repository
Repository(ref string) Repository
Lookup(term string) []Image // docker registry v1 only AFAICT, v2 can be built hacking with Images()
}
type Repository interface {
Images() []Image
Image(ref string) Image // ref == image name w/o registry part
}
type Image interface {
// ref to repository?
Layers(layers ...string) error // configure download directory? Call it DownloadLayers?
Manifest(version string) (ImageManifest, error)
RawManifest(version string) ([]byte, error)