Skip to content

Commit 99e8cd6

Browse files
committed
docker10: Remove unused types and functions
1 parent d940da2 commit 99e8cd6

File tree

2 files changed

+0
-87
lines changed

2 files changed

+0
-87
lines changed

pkg/image/apis/image/docker10/conversion.go

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,9 @@ package docker10
33
import (
44
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
55

6-
"github.com/openshift/api/image/docker10"
7-
86
"github.com/openshift/openshift-apiserver/pkg/image/apis/image"
97
)
108

11-
// Convert_DockerV1CompatibilityImage_to_DockerImageConfig takes a container image registry digest
12-
// (schema 2.1) and converts it to the external API version of Image.
13-
func Convert_DockerV1CompatibilityImage_to_DockerImageConfig(in *DockerV1CompatibilityImage, out *DockerImageConfig) error {
14-
*out = DockerImageConfig{
15-
ID: in.ID,
16-
Parent: in.Parent,
17-
Comment: in.Comment,
18-
Created: in.Created,
19-
Container: in.Container,
20-
DockerVersion: in.DockerVersion,
21-
Author: in.Author,
22-
Architecture: in.Architecture,
23-
Size: in.Size,
24-
OS: "linux",
25-
ContainerConfig: in.ContainerConfig,
26-
}
27-
if in.Config != nil {
28-
out.Config = &docker10.DockerConfig{}
29-
*out.Config = *in.Config
30-
}
31-
return nil
32-
}
33-
34-
// Convert_DockerV1CompatibilityImage_to_image_DockerImage takes a container
35-
// image registry digest (schema 2.1) and converts it to the internal API
36-
// version of Image.
37-
func Convert_DockerV1CompatibilityImage_to_image_DockerImage(in *DockerV1CompatibilityImage, out *image.DockerImage) error {
38-
*out = image.DockerImage{
39-
ID: in.ID,
40-
Parent: in.Parent,
41-
Comment: in.Comment,
42-
Created: metav1.Time{Time: in.Created},
43-
Container: in.Container,
44-
DockerVersion: in.DockerVersion,
45-
Author: in.Author,
46-
Architecture: in.Architecture,
47-
Size: in.Size,
48-
}
49-
if err := Convert_docker10_DockerConfig_To_image_DockerConfig(&in.ContainerConfig, &out.ContainerConfig, nil); err != nil {
50-
return err
51-
}
52-
if in.Config != nil {
53-
out.Config = &image.DockerConfig{}
54-
if err := Convert_docker10_DockerConfig_To_image_DockerConfig(in.Config, out.Config, nil); err != nil {
55-
return err
56-
}
57-
}
58-
return nil
59-
}
60-
619
// Convert_DockerImageConfig_to_image_DockerImage takes a container image
6210
// registry digest (schema 2.2) and converts it to the internal API version of
6311
// Image.

pkg/image/apis/image/docker10/types.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -33,41 +33,6 @@ type DockerImageManifest struct {
3333
Config Descriptor `json:"config"`
3434
}
3535

36-
// DockerFSLayer is a container struct for BlobSums defined in an image manifest
37-
type DockerFSLayer struct {
38-
// DockerBlobSum is the tarsum of the referenced filesystem image layer
39-
// TODO make this digest.Digest once distribution/distribution/v3 is in Godeps
40-
DockerBlobSum string `json:"blobSum"`
41-
}
42-
43-
// DockerHistory stores unstructured v1 compatibility information
44-
type DockerHistory struct {
45-
// DockerV1Compatibility is the raw v1 compatibility information
46-
DockerV1Compatibility string `json:"v1Compatibility"`
47-
}
48-
49-
// DockerV1CompatibilityImage represents the structured v1
50-
// compatibility information.
51-
type DockerV1CompatibilityImage struct {
52-
ID string `json:"id"`
53-
Parent string `json:"parent,omitempty"`
54-
Comment string `json:"comment,omitempty"`
55-
Created time.Time `json:"created"`
56-
Container string `json:"container,omitempty"`
57-
ContainerConfig docker10.DockerConfig `json:"container_config,omitempty"`
58-
DockerVersion string `json:"docker_version,omitempty"`
59-
Author string `json:"author,omitempty"`
60-
Config *docker10.DockerConfig `json:"config,omitempty"`
61-
Architecture string `json:"architecture,omitempty"`
62-
Size int64 `json:"size,omitempty"`
63-
}
64-
65-
// DockerV1CompatibilityImageSize represents the structured v1
66-
// compatibility information for size
67-
type DockerV1CompatibilityImageSize struct {
68-
Size int64 `json:"size,omitempty"`
69-
}
70-
7136
// DockerImageConfig stores the image configuration
7237
type DockerImageConfig struct {
7338
ID string `json:"id"`

0 commit comments

Comments
 (0)