mirror of
https://github.com/containers/skopeo.git
synced 2025-08-11 11:22:05 +00:00
attempt abstract interface
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
b46d977403
commit
41329ca504
@ -4,21 +4,21 @@ import (
|
|||||||
containerTypes "github.com/docker/engine-api/types/container"
|
containerTypes "github.com/docker/engine-api/types/container"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Kind int
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
KindUnknown Kind = iota
|
|
||||||
KindDocker
|
|
||||||
KindAppc
|
|
||||||
|
|
||||||
DockerPrefix = "docker://"
|
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 {
|
type Image interface {
|
||||||
Kind() Kind
|
Layers(layers []string) error
|
||||||
GetLayers(layers []string) error
|
Manifest(version string) (ImageManifest, error)
|
||||||
GetManifest(version string) ([]byte, error)
|
RawManifest(version string) ([]byte, error)
|
||||||
GetRawManifest(version string) ([]byte, error)
|
DockerTar() ([]byte, error) // ???
|
||||||
}
|
}
|
||||||
|
|
||||||
type ImageManifest struct {
|
type ImageManifest struct {
|
||||||
@ -27,10 +27,11 @@ type ImageManifest struct {
|
|||||||
RepoTags []string
|
RepoTags []string
|
||||||
Comment string
|
Comment string
|
||||||
Created string
|
Created string
|
||||||
ContainerConfig *containerTypes.Config
|
ContainerConfig *containerTypes.Config // remove docker/docker code
|
||||||
DockerVersion string
|
DockerVersion string
|
||||||
Author string
|
Author string
|
||||||
Config *containerTypes.Config
|
Config *containerTypes.Config // remove docker/docker code
|
||||||
Architecture string
|
Architecture string
|
||||||
Os string
|
Os string
|
||||||
|
Layers []string // ???
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user