From 6f1d01a8093ecde5d905438dcd9dee7356753083 Mon Sep 17 00:00:00 2001 From: Tomas Kral Date: Tue, 20 Sep 2016 13:47:43 +0200 Subject: [PATCH 1/2] OpenShift - generate DeploymentConfig with ImageStream. --- Godeps/Godeps.json | 20 + cli/app/app.go | 3 +- pkg/transformer/kubernetes/k8sutils.go | 3 + pkg/transformer/openshift/openshift.go | 68 +- .../pkg/image/api/docker10/dockertypes.go | 54 + .../origin/pkg/image/api/docker10/register.go | 24 + .../pkg/image/api/dockerpre012/conversion.go | 60 + .../pkg/image/api/dockerpre012/dockertypes.go | 55 + .../pkg/image/api/dockerpre012/register.go | 25 + .../origin/pkg/image/api/install/install.go | 127 + .../origin/pkg/image/api/v1/conversion.go | 290 + .../pkg/image/api/v1/conversion_generated.go | 1087 +++ .../pkg/image/api/v1/deep_copy_generated.go | 622 ++ .../origin/pkg/image/api/v1/defaults.go | 26 + .../openshift/origin/pkg/image/api/v1/doc.go | 3 + .../origin/pkg/image/api/v1/generated.pb.go | 6705 +++++++++++++++++ .../origin/pkg/image/api/v1/generated.proto | 434 ++ .../origin/pkg/image/api/v1/register.go | 47 + .../origin/pkg/image/api/v1/swagger_doc.go | 339 + .../origin/pkg/image/api/v1/types.go | 391 + 20 files changed, 10380 insertions(+), 3 deletions(-) create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/docker10/dockertypes.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/docker10/register.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/conversion.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/dockertypes.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/register.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/install/install.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/conversion.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/conversion_generated.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/deep_copy_generated.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/defaults.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/doc.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/generated.pb.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/generated.proto create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/register.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/swagger_doc.go create mode 100644 vendor/github.com/openshift/origin/pkg/image/api/v1/types.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index a9f741e5..38e6e203 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -779,6 +779,26 @@ "Comment": "v1.3.0-alpha.2-1281-g2e48c47", "Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1" }, + { + "ImportPath": "github.com/openshift/origin/pkg/image/api/docker10", + "Comment": "v1.3.0-alpha.2-1281-g2e48c47", + "Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1" + }, + { + "ImportPath": "github.com/openshift/origin/pkg/image/api/dockerpre012", + "Comment": "v1.3.0-alpha.2-1281-g2e48c47", + "Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1" + }, + { + "ImportPath": "github.com/openshift/origin/pkg/image/api/install", + "Comment": "v1.3.0-alpha.2-1281-g2e48c47", + "Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1" + }, + { + "ImportPath": "github.com/openshift/origin/pkg/image/api/v1", + "Comment": "v1.3.0-alpha.2-1281-g2e48c47", + "Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1" + }, { "ImportPath": "github.com/openshift/origin/pkg/oauth/api", "Comment": "v1.3.0-alpha.2-1281-g2e48c47", diff --git a/cli/app/app.go b/cli/app/app.go index d927ca51..2ddfab68 100644 --- a/cli/app/app.go +++ b/cli/app/app.go @@ -28,8 +28,9 @@ import ( client "k8s.io/kubernetes/pkg/client/unversioned" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" - // install OpenShift apis + // install OpenShift api _ "github.com/openshift/origin/pkg/deploy/api/install" + _ "github.com/openshift/origin/pkg/image/api/install" "github.com/skippbox/kompose/pkg/kobject" "github.com/skippbox/kompose/pkg/loader" diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go index 8ebd2fd4..87df70cc 100644 --- a/pkg/transformer/kubernetes/k8sutils.go +++ b/pkg/transformer/kubernetes/k8sutils.go @@ -37,6 +37,7 @@ import ( "k8s.io/kubernetes/pkg/runtime" deployapi "github.com/openshift/origin/pkg/deploy/api" + imageapi "github.com/openshift/origin/pkg/image/api" ) /** @@ -177,6 +178,8 @@ func PrintList(objects []runtime.Object, opt kobject.ConvertOptions) error { file = transformer.Print(t.Name, strings.ToLower(t.Kind), data, opt.ToStdout, opt.GenerateYaml, f) case *deployapi.DeploymentConfig: file = transformer.Print(t.Name, strings.ToLower(t.Kind), data, opt.ToStdout, opt.GenerateYaml, f) + case *imageapi.ImageStream: + file = transformer.Print(t.Name, strings.ToLower(t.Kind), data, opt.ToStdout, opt.GenerateYaml, f) case *api.Service: file = transformer.Print(t.Name, strings.ToLower(t.Kind), data, opt.ToStdout, opt.GenerateYaml, f) } diff --git a/pkg/transformer/openshift/openshift.go b/pkg/transformer/openshift/openshift.go index e927d459..fd874c2e 100644 --- a/pkg/transformer/openshift/openshift.go +++ b/pkg/transformer/openshift/openshift.go @@ -18,19 +18,62 @@ package openshift import ( deployapi "github.com/openshift/origin/pkg/deploy/api" + imageapi "github.com/openshift/origin/pkg/image/api" + "github.com/skippbox/kompose/pkg/kobject" "github.com/skippbox/kompose/pkg/transformer/kubernetes" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/runtime" + + "strings" ) type OpenShift struct { } +// getImageTag get tag name from image name +// if no tag is specified return 'latest' +func getImageTag(image string) string { + p := strings.Split(image, ":") + if len(p) == 2 { + return p[1] + } else { + return "latest" + } +} + +// initImageStream initialize ImageStream object +func initImageStream(name string, service kobject.ServiceConfig) *imageapi.ImageStream { + tag := getImageTag(service.Image) + + is := &imageapi.ImageStream{ + TypeMeta: unversioned.TypeMeta{ + Kind: "ImageStream", + APIVersion: "v1", + }, + ObjectMeta: api.ObjectMeta{ + Name: name, + }, + Spec: imageapi.ImageStreamSpec{ + Tags: map[string]imageapi.TagReference{ + tag: imageapi.TagReference{ + From: &api.ObjectReference{ + Kind: "DockerImage", + Name: service.Image, + }, + }, + }, + }, + } + return is +} + // initDeploymentConfig initialize OpenShifts DeploymentConfig object func initDeploymentConfig(name string, service kobject.ServiceConfig, replicas int) *deployapi.DeploymentConfig { + tag := getImageTag(service.Image) + dc := &deployapi.DeploymentConfig{ TypeMeta: unversioned.TypeMeta{ Kind: "DeploymentConfig", @@ -51,8 +94,27 @@ func initDeploymentConfig(name string, service kobject.ServiceConfig, replicas i Spec: api.PodSpec{ Containers: []api.Container{ { - Name: name, - Image: service.Image, + Name: name, + // Image will be set to ImageStream image by ImageChange trigger. + Image: " ", + }, + }, + }, + }, + Triggers: []deployapi.DeploymentTriggerPolicy{ + // Trigger new deploy when DeploymentConfig is created (config change) + deployapi.DeploymentTriggerPolicy{ + Type: deployapi.DeploymentTriggerOnConfigChange, + }, + deployapi.DeploymentTriggerPolicy{ + Type: deployapi.DeploymentTriggerOnImageChange, + ImageChangeParams: &deployapi.DeploymentTriggerImageChangeParams{ + //Automatic - if new tag is detected - update image update inside the pod template + Automatic: true, + ContainerNames: []string{name}, + From: api.ObjectReference{ + Name: name + ":" + tag, + Kind: "ImageStreamTag", }, }, }, @@ -73,6 +135,8 @@ func (k *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C if opt.CreateDeploymentConfig { objects = append(objects, initDeploymentConfig(name, service, opt.Replicas)) // OpenShift DeploymentConfigs + // create ImageStream after deployment (creating IS will trigger new deployment) + objects = append(objects, initImageStream(name, service)) } // If ports not provided in configuration we will not make service diff --git a/vendor/github.com/openshift/origin/pkg/image/api/docker10/dockertypes.go b/vendor/github.com/openshift/origin/pkg/image/api/docker10/dockertypes.go new file mode 100644 index 00000000..4fab3baa --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/docker10/dockertypes.go @@ -0,0 +1,54 @@ +package docker10 + +import ( + "k8s.io/kubernetes/pkg/api/unversioned" +) + +// DockerImage is the type representing a docker image and its various properties when +// retrieved from the Docker client API. +type DockerImage struct { + unversioned.TypeMeta `json:",inline"` + + ID string `json:"Id"` + Parent string `json:"Parent,omitempty"` + Comment string `json:"Comment,omitempty"` + Created unversioned.Time `json:"Created,omitempty"` + Container string `json:"Container,omitempty"` + ContainerConfig DockerConfig `json:"ContainerConfig,omitempty"` + DockerVersion string `json:"DockerVersion,omitempty"` + Author string `json:"Author,omitempty"` + Config *DockerConfig `json:"Config,omitempty"` + Architecture string `json:"Architecture,omitempty"` + Size int64 `json:"Size,omitempty"` +} + +// DockerConfig is the list of configuration options used when creating a container. +type DockerConfig struct { + Hostname string `json:"Hostname,omitempty"` + Domainname string `json:"Domainname,omitempty"` + User string `json:"User,omitempty"` + Memory int64 `json:"Memory,omitempty"` + MemorySwap int64 `json:"MemorySwap,omitempty"` + CPUShares int64 `json:"CpuShares,omitempty"` + CPUSet string `json:"Cpuset,omitempty"` + AttachStdin bool `json:"AttachStdin,omitempty"` + AttachStdout bool `json:"AttachStdout,omitempty"` + AttachStderr bool `json:"AttachStderr,omitempty"` + PortSpecs []string `json:"PortSpecs,omitempty"` + ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` + Tty bool `json:"Tty,omitempty"` + OpenStdin bool `json:"OpenStdin,omitempty"` + StdinOnce bool `json:"StdinOnce,omitempty"` + Env []string `json:"Env,omitempty"` + Cmd []string `json:"Cmd,omitempty"` + DNS []string `json:"Dns,omitempty"` // For Docker API v1.9 and below only + Image string `json:"Image,omitempty"` + Volumes map[string]struct{} `json:"Volumes,omitempty"` + VolumesFrom string `json:"VolumesFrom,omitempty"` + WorkingDir string `json:"WorkingDir,omitempty"` + Entrypoint []string `json:"Entrypoint,omitempty"` + NetworkDisabled bool `json:"NetworkDisabled,omitempty"` + SecurityOpts []string `json:"SecurityOpts,omitempty"` + OnBuild []string `json:"OnBuild,omitempty"` + Labels map[string]string `json:"Labels,omitempty"` +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/docker10/register.go b/vendor/github.com/openshift/origin/pkg/image/api/docker10/register.go new file mode 100644 index 00000000..b595b70a --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/docker10/register.go @@ -0,0 +1,24 @@ +package docker10 + +import ( + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/runtime" +) + +const GroupName = "" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "1.0"} + +func AddToScheme(scheme *runtime.Scheme) { + addKnownTypes(scheme) +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) { + scheme.AddKnownTypes(SchemeGroupVersion, + &DockerImage{}, + ) +} + +func (obj *DockerImage) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/conversion.go b/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/conversion.go new file mode 100644 index 00000000..3ebf0f2b --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/conversion.go @@ -0,0 +1,60 @@ +package dockerpre012 + +import ( + "github.com/fsouza/go-dockerclient" + + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/conversion" + "k8s.io/kubernetes/pkg/runtime" + + newer "github.com/openshift/origin/pkg/image/api" +) + +// Convert docker client object to internal object, but only when this package is included +func Convert_dockerpre012_ImagePre_012_to_api_DockerImage(in *docker.ImagePre012, out *newer.DockerImage, s conversion.Scope) error { + if err := s.Convert(in.Config, &out.Config, conversion.AllowDifferentFieldTypeNames); err != nil { + return err + } + if err := s.Convert(&in.ContainerConfig, &out.ContainerConfig, conversion.AllowDifferentFieldTypeNames); err != nil { + return err + } + out.ID = in.ID + out.Parent = in.Parent + out.Comment = in.Comment + out.Created = unversioned.NewTime(in.Created) + out.Container = in.Container + out.DockerVersion = in.DockerVersion + out.Author = in.Author + out.Architecture = in.Architecture + out.Size = in.Size + return nil +} +func Convert_api_DockerImage_to_dockerpre012_ImagePre_012(in *newer.DockerImage, out *docker.ImagePre012, s conversion.Scope) error { + if err := s.Convert(&in.Config, &out.Config, conversion.AllowDifferentFieldTypeNames); err != nil { + return err + } + if err := s.Convert(&in.ContainerConfig, &out.ContainerConfig, conversion.AllowDifferentFieldTypeNames); err != nil { + return err + } + out.ID = in.ID + out.Parent = in.Parent + out.Comment = in.Comment + out.Created = in.Created.Time + out.Container = in.Container + out.DockerVersion = in.DockerVersion + out.Author = in.Author + out.Architecture = in.Architecture + out.Size = in.Size + return nil +} + +func addConversionFuncs(scheme *runtime.Scheme) { + err := scheme.AddConversionFuncs( + Convert_dockerpre012_ImagePre_012_to_api_DockerImage, + Convert_api_DockerImage_to_dockerpre012_ImagePre_012, + ) + if err != nil { + // If one of the conversion functions is malformed, detect it immediately. + panic(err) + } +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/dockertypes.go b/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/dockertypes.go new file mode 100644 index 00000000..07620520 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/dockertypes.go @@ -0,0 +1,55 @@ +package dockerpre012 + +import ( + "k8s.io/kubernetes/pkg/api/unversioned" +) + +// DockerImage is for earlier versions of the Docker API (pre-012 to be specific). It is also the +// version of metadata that the Docker registry uses to persist metadata. +type DockerImage struct { + unversioned.TypeMeta `json:",inline"` + + ID string `json:"id"` + Parent string `json:"parent,omitempty"` + Comment string `json:"comment,omitempty"` + Created unversioned.Time `json:"created"` + Container string `json:"container,omitempty"` + ContainerConfig DockerConfig `json:"container_config,omitempty"` + DockerVersion string `json:"docker_version,omitempty"` + Author string `json:"author,omitempty"` + Config *DockerConfig `json:"config,omitempty"` + Architecture string `json:"architecture,omitempty"` + Size int64 `json:"size,omitempty"` +} + +// DockerConfig is the list of configuration options used when creating a container. +type DockerConfig struct { + Hostname string `json:"Hostname,omitempty"` + Domainname string `json:"Domainname,omitempty"` + User string `json:"User,omitempty"` + Memory int64 `json:"Memory,omitempty"` + MemorySwap int64 `json:"MemorySwap,omitempty"` + CPUShares int64 `json:"CpuShares,omitempty"` + CPUSet string `json:"Cpuset,omitempty"` + AttachStdin bool `json:"AttachStdin,omitempty"` + AttachStdout bool `json:"AttachStdout,omitempty"` + AttachStderr bool `json:"AttachStderr,omitempty"` + PortSpecs []string `json:"PortSpecs,omitempty"` + ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` + Tty bool `json:"Tty,omitempty"` + OpenStdin bool `json:"OpenStdin,omitempty"` + StdinOnce bool `json:"StdinOnce,omitempty"` + Env []string `json:"Env,omitempty"` + Cmd []string `json:"Cmd,omitempty"` + DNS []string `json:"Dns,omitempty"` // For Docker API v1.9 and below only + Image string `json:"Image,omitempty"` + Volumes map[string]struct{} `json:"Volumes,omitempty"` + VolumesFrom string `json:"VolumesFrom,omitempty"` + WorkingDir string `json:"WorkingDir,omitempty"` + Entrypoint []string `json:"Entrypoint,omitempty"` + NetworkDisabled bool `json:"NetworkDisabled,omitempty"` + SecurityOpts []string `json:"SecurityOpts,omitempty"` + OnBuild []string `json:"OnBuild,omitempty"` + // This field is not supported in pre012 and will always be empty. + Labels map[string]string `json:"Labels,omitempty"` +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/register.go b/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/register.go new file mode 100644 index 00000000..28c6a228 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/register.go @@ -0,0 +1,25 @@ +package dockerpre012 + +import ( + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/runtime" +) + +const GroupName = "" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "pre012"} + +func AddToScheme(scheme *runtime.Scheme) { + addKnownTypes(scheme) + addConversionFuncs(scheme) +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) { + scheme.AddKnownTypes(SchemeGroupVersion, + &DockerImage{}, + ) +} + +func (obj *DockerImage) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/github.com/openshift/origin/pkg/image/api/install/install.go b/vendor/github.com/openshift/origin/pkg/image/api/install/install.go new file mode 100644 index 00000000..e6ea5ad7 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/install/install.go @@ -0,0 +1,127 @@ +package install + +import ( + "fmt" + + "github.com/golang/glog" + + kapi "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/meta" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/apimachinery" + "k8s.io/kubernetes/pkg/apimachinery/registered" + "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/util/sets" + + "github.com/openshift/origin/pkg/image/api" + "github.com/openshift/origin/pkg/image/api/docker10" + "github.com/openshift/origin/pkg/image/api/dockerpre012" + "github.com/openshift/origin/pkg/image/api/v1" +) + +const importPrefix = "github.com/openshift/origin/pkg/image/api" + +var accessor = meta.NewAccessor() + +// availableVersions lists all known external versions for this group from most preferred to least preferred +var availableVersions = []unversioned.GroupVersion{v1.SchemeGroupVersion, docker10.SchemeGroupVersion, dockerpre012.SchemeGroupVersion} + +func init() { + registered.RegisterVersions(availableVersions) + externalVersions := []unversioned.GroupVersion{} + for _, v := range availableVersions { + if registered.IsAllowedVersion(v) { + externalVersions = append(externalVersions, v) + } + } + if len(externalVersions) == 0 { + glog.Infof("No version is registered for group %v", api.GroupName) + return + } + + if err := registered.EnableVersions(externalVersions...); err != nil { + panic(err) + } + if err := enableVersions(externalVersions); err != nil { + panic(err) + } +} + +// TODO: enableVersions should be centralized rather than spread in each API +// group. +// We can combine registered.RegisterVersions, registered.EnableVersions and +// registered.RegisterGroup once we have moved enableVersions there. +func enableVersions(externalVersions []unversioned.GroupVersion) error { + addVersionsToScheme(externalVersions...) + preferredExternalVersion := externalVersions[0] + + groupMeta := apimachinery.GroupMeta{ + GroupVersion: preferredExternalVersion, + GroupVersions: externalVersions, + RESTMapper: newRESTMapper(externalVersions), + SelfLinker: runtime.SelfLinker(accessor), + InterfacesFor: interfacesFor, + } + + if err := registered.RegisterGroup(groupMeta); err != nil { + return err + } + kapi.RegisterRESTMapper(groupMeta.RESTMapper) + return nil +} + +func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { + // add the internal version to Scheme + api.AddToScheme(kapi.Scheme) + // add the enabled external versions to Scheme + for _, v := range externalVersions { + if !registered.IsEnabledVersion(v) { + glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v) + continue + } + switch v { + case v1.SchemeGroupVersion: + v1.AddToScheme(kapi.Scheme) + case docker10.SchemeGroupVersion: + docker10.AddToScheme(kapi.Scheme) + case dockerpre012.SchemeGroupVersion: + dockerpre012.AddToScheme(kapi.Scheme) + + default: + glog.Errorf("Version %s is not known, so it will not be added to the Scheme.", v) + continue + } + } +} + +func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper { + rootScoped := sets.NewString("Image") + ignoredKinds := sets.NewString() + return kapi.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped) +} + +func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) { + switch version { + case v1.SchemeGroupVersion: + return &meta.VersionInterfaces{ + ObjectConvertor: kapi.Scheme, + MetadataAccessor: accessor, + }, nil + + case docker10.SchemeGroupVersion: + return &meta.VersionInterfaces{ + ObjectConvertor: kapi.Scheme, + MetadataAccessor: accessor, + }, nil + + case dockerpre012.SchemeGroupVersion: + return &meta.VersionInterfaces{ + ObjectConvertor: kapi.Scheme, + MetadataAccessor: accessor, + }, nil + + default: + g, _ := registered.Group(api.GroupName) + return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions) + } +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/conversion.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/conversion.go new file mode 100644 index 00000000..94d92306 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/conversion.go @@ -0,0 +1,290 @@ +package v1 + +import ( + "sort" + "strings" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/conversion" + "k8s.io/kubernetes/pkg/runtime" + + oapi "github.com/openshift/origin/pkg/api" + newer "github.com/openshift/origin/pkg/image/api" +) + +// The docker metadata must be cast to a version +func Convert_api_Image_To_v1_Image(in *newer.Image, out *Image, s conversion.Scope) error { + if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { + return err + } + + out.DockerImageReference = in.DockerImageReference + out.DockerImageManifest = in.DockerImageManifest + out.DockerImageManifestMediaType = in.DockerImageManifestMediaType + out.DockerImageConfig = in.DockerImageConfig + + gvString := in.DockerImageMetadataVersion + if len(gvString) == 0 { + gvString = "1.0" + } + if !strings.Contains(gvString, "/") { + gvString = "/" + gvString + } + + version, err := unversioned.ParseGroupVersion(gvString) + if err != nil { + return err + } + data, err := runtime.Encode(api.Codecs.LegacyCodec(version), &in.DockerImageMetadata) + if err != nil { + return err + } + out.DockerImageMetadata.Raw = data + out.DockerImageMetadataVersion = version.Version + + if in.DockerImageLayers != nil { + out.DockerImageLayers = make([]ImageLayer, len(in.DockerImageLayers)) + for i := range in.DockerImageLayers { + out.DockerImageLayers[i].MediaType = in.DockerImageLayers[i].MediaType + out.DockerImageLayers[i].Name = in.DockerImageLayers[i].Name + out.DockerImageLayers[i].LayerSize = in.DockerImageLayers[i].LayerSize + } + } else { + out.DockerImageLayers = nil + } + + if in.Signatures != nil { + out.Signatures = make([]ImageSignature, len(in.Signatures)) + for i := range in.Signatures { + if err := s.Convert(&in.Signatures[i], &out.Signatures[i], 0); err != nil { + return err + } + } + } else { + out.Signatures = nil + } + + if in.DockerImageSignatures != nil { + out.DockerImageSignatures = nil + for _, v := range in.DockerImageSignatures { + out.DockerImageSignatures = append(out.DockerImageSignatures, v) + } + } else { + out.DockerImageSignatures = nil + } + + return nil +} + +func Convert_v1_Image_To_api_Image(in *Image, out *newer.Image, s conversion.Scope) error { + if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { + return err + } + + out.DockerImageReference = in.DockerImageReference + out.DockerImageManifest = in.DockerImageManifest + out.DockerImageManifestMediaType = in.DockerImageManifestMediaType + out.DockerImageConfig = in.DockerImageConfig + + version := in.DockerImageMetadataVersion + if len(version) == 0 { + version = "1.0" + } + if len(in.DockerImageMetadata.Raw) > 0 { + // TODO: add a way to default the expected kind and version of an object if not set + obj, err := api.Scheme.New(unversioned.GroupVersionKind{Version: version, Kind: "DockerImage"}) + if err != nil { + return err + } + if err := runtime.DecodeInto(api.Codecs.UniversalDecoder(), in.DockerImageMetadata.Raw, obj); err != nil { + return err + } + if err := s.Convert(obj, &out.DockerImageMetadata, 0); err != nil { + return err + } + } + out.DockerImageMetadataVersion = version + + if in.DockerImageLayers != nil { + out.DockerImageLayers = make([]newer.ImageLayer, len(in.DockerImageLayers)) + for i := range in.DockerImageLayers { + out.DockerImageLayers[i].MediaType = in.DockerImageLayers[i].MediaType + out.DockerImageLayers[i].Name = in.DockerImageLayers[i].Name + out.DockerImageLayers[i].LayerSize = in.DockerImageLayers[i].LayerSize + } + } else { + out.DockerImageLayers = nil + } + + if in.Signatures != nil { + out.Signatures = make([]newer.ImageSignature, len(in.Signatures)) + for i := range in.Signatures { + if err := s.Convert(&in.Signatures[i], &out.Signatures[i], 0); err != nil { + return err + } + } + } else { + out.Signatures = nil + } + + if in.DockerImageSignatures != nil { + out.DockerImageSignatures = nil + for _, v := range in.DockerImageSignatures { + out.DockerImageSignatures = append(out.DockerImageSignatures, v) + } + } else { + out.DockerImageSignatures = nil + } + + return nil +} + +func Convert_v1_ImageStreamSpec_To_api_ImageStreamSpec(in *ImageStreamSpec, out *newer.ImageStreamSpec, s conversion.Scope) error { + out.DockerImageRepository = in.DockerImageRepository + out.Tags = make(map[string]newer.TagReference) + return s.Convert(&in.Tags, &out.Tags, 0) +} + +func Convert_api_ImageStreamSpec_To_v1_ImageStreamSpec(in *newer.ImageStreamSpec, out *ImageStreamSpec, s conversion.Scope) error { + out.DockerImageRepository = in.DockerImageRepository + if len(in.DockerImageRepository) > 0 { + // ensure that stored image references have no tag or ID, which was possible from 1.0.0 until 1.0.7 + if ref, err := newer.ParseDockerImageReference(in.DockerImageRepository); err == nil { + if len(ref.Tag) > 0 || len(ref.ID) > 0 { + ref.Tag, ref.ID = "", "" + out.DockerImageRepository = ref.Exact() + } + } + } + out.Tags = make([]TagReference, 0, 0) + return s.Convert(&in.Tags, &out.Tags, 0) +} + +func Convert_v1_ImageStreamStatus_To_api_ImageStreamStatus(in *ImageStreamStatus, out *newer.ImageStreamStatus, s conversion.Scope) error { + out.DockerImageRepository = in.DockerImageRepository + out.Tags = make(map[string]newer.TagEventList) + return s.Convert(&in.Tags, &out.Tags, 0) +} + +func Convert_api_ImageStreamStatus_To_v1_ImageStreamStatus(in *newer.ImageStreamStatus, out *ImageStreamStatus, s conversion.Scope) error { + out.DockerImageRepository = in.DockerImageRepository + if len(in.DockerImageRepository) > 0 { + // ensure that stored image references have no tag or ID, which was possible from 1.0.0 until 1.0.7 + if ref, err := newer.ParseDockerImageReference(in.DockerImageRepository); err == nil { + if len(ref.Tag) > 0 || len(ref.ID) > 0 { + ref.Tag, ref.ID = "", "" + out.DockerImageRepository = ref.Exact() + } + } + } + out.Tags = make([]NamedTagEventList, 0, 0) + return s.Convert(&in.Tags, &out.Tags, 0) +} + +func Convert_api_ImageStreamMapping_To_v1_ImageStreamMapping(in *newer.ImageStreamMapping, out *ImageStreamMapping, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.DestFromSource) +} + +func Convert_v1_ImageStreamMapping_To_api_ImageStreamMapping(in *ImageStreamMapping, out *newer.ImageStreamMapping, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.SourceToDest) +} + +func Convert_v1_NamedTagEventListArray_to_api_TagEventListArray(in *[]NamedTagEventList, out *map[string]newer.TagEventList, s conversion.Scope) error { + for _, curr := range *in { + newTagEventList := newer.TagEventList{} + if err := s.Convert(&curr.Conditions, &newTagEventList.Conditions, 0); err != nil { + return err + } + if err := s.Convert(&curr.Items, &newTagEventList.Items, 0); err != nil { + return err + } + (*out)[curr.Tag] = newTagEventList + } + + return nil +} +func Convert_api_TagEventListArray_to_v1_NamedTagEventListArray(in *map[string]newer.TagEventList, out *[]NamedTagEventList, s conversion.Scope) error { + allKeys := make([]string, 0, len(*in)) + for key := range *in { + allKeys = append(allKeys, key) + } + sort.Strings(allKeys) + + for _, key := range allKeys { + newTagEventList := (*in)[key] + oldTagEventList := &NamedTagEventList{Tag: key} + if err := s.Convert(&newTagEventList.Conditions, &oldTagEventList.Conditions, 0); err != nil { + return err + } + if err := s.Convert(&newTagEventList.Items, &oldTagEventList.Items, 0); err != nil { + return err + } + + *out = append(*out, *oldTagEventList) + } + + return nil +} +func Convert_v1_TagReferenceArray_to_api_TagReferenceMap(in *[]TagReference, out *map[string]newer.TagReference, s conversion.Scope) error { + for _, curr := range *in { + r := newer.TagReference{} + if err := s.Convert(&curr, &r, 0); err != nil { + return err + } + (*out)[curr.Name] = r + } + return nil +} +func Convert_api_TagReferenceMap_to_v1_TagReferenceArray(in *map[string]newer.TagReference, out *[]TagReference, s conversion.Scope) error { + allTags := make([]string, 0, len(*in)) + for tag := range *in { + allTags = append(allTags, tag) + } + sort.Strings(allTags) + + for _, tag := range allTags { + newTagReference := (*in)[tag] + oldTagReference := TagReference{} + if err := s.Convert(&newTagReference, &oldTagReference, 0); err != nil { + return err + } + oldTagReference.Name = tag + *out = append(*out, oldTagReference) + } + return nil +} + +func addConversionFuncs(scheme *runtime.Scheme) { + err := scheme.AddConversionFuncs( + Convert_v1_NamedTagEventListArray_to_api_TagEventListArray, + Convert_api_TagEventListArray_to_v1_NamedTagEventListArray, + Convert_v1_TagReferenceArray_to_api_TagReferenceMap, + Convert_api_TagReferenceMap_to_v1_TagReferenceArray, + + Convert_api_Image_To_v1_Image, + Convert_v1_Image_To_api_Image, + Convert_v1_ImageStreamSpec_To_api_ImageStreamSpec, + Convert_api_ImageStreamSpec_To_v1_ImageStreamSpec, + Convert_v1_ImageStreamStatus_To_api_ImageStreamStatus, + Convert_api_ImageStreamStatus_To_v1_ImageStreamStatus, + Convert_api_ImageStreamMapping_To_v1_ImageStreamMapping, + Convert_v1_ImageStreamMapping_To_api_ImageStreamMapping, + ) + if err != nil { + // If one of the conversion functions is malformed, detect it immediately. + panic(err) + } + + if err := scheme.AddFieldLabelConversionFunc("v1", "Image", + oapi.GetFieldLabelConversionFunc(newer.ImageToSelectableFields(&newer.Image{}), nil), + ); err != nil { + panic(err) + } + + if err := scheme.AddFieldLabelConversionFunc("v1", "ImageStream", + oapi.GetFieldLabelConversionFunc(newer.ImageStreamToSelectableFields(&newer.ImageStream{}), map[string]string{"name": "metadata.name"}), + ); err != nil { + panic(err) + } +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/conversion_generated.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/conversion_generated.go new file mode 100644 index 00000000..d01c1c65 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/conversion_generated.go @@ -0,0 +1,1087 @@ +// +build !ignore_autogenerated_openshift + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1 + +import ( + image_api "github.com/openshift/origin/pkg/image/api" + api "k8s.io/kubernetes/pkg/api" + api_v1 "k8s.io/kubernetes/pkg/api/v1" + conversion "k8s.io/kubernetes/pkg/conversion" +) + +func init() { + if err := api.Scheme.AddGeneratedConversionFuncs( + Convert_v1_DockerImageReference_To_api_DockerImageReference, + Convert_api_DockerImageReference_To_v1_DockerImageReference, + Convert_v1_Image_To_api_Image, + Convert_api_Image_To_v1_Image, + Convert_v1_ImageImportSpec_To_api_ImageImportSpec, + Convert_api_ImageImportSpec_To_v1_ImageImportSpec, + Convert_v1_ImageImportStatus_To_api_ImageImportStatus, + Convert_api_ImageImportStatus_To_v1_ImageImportStatus, + Convert_v1_ImageLayer_To_api_ImageLayer, + Convert_api_ImageLayer_To_v1_ImageLayer, + Convert_v1_ImageList_To_api_ImageList, + Convert_api_ImageList_To_v1_ImageList, + Convert_v1_ImageSignature_To_api_ImageSignature, + Convert_api_ImageSignature_To_v1_ImageSignature, + Convert_v1_ImageStream_To_api_ImageStream, + Convert_api_ImageStream_To_v1_ImageStream, + Convert_v1_ImageStreamImage_To_api_ImageStreamImage, + Convert_api_ImageStreamImage_To_v1_ImageStreamImage, + Convert_v1_ImageStreamImport_To_api_ImageStreamImport, + Convert_api_ImageStreamImport_To_v1_ImageStreamImport, + Convert_v1_ImageStreamImportSpec_To_api_ImageStreamImportSpec, + Convert_api_ImageStreamImportSpec_To_v1_ImageStreamImportSpec, + Convert_v1_ImageStreamImportStatus_To_api_ImageStreamImportStatus, + Convert_api_ImageStreamImportStatus_To_v1_ImageStreamImportStatus, + Convert_v1_ImageStreamList_To_api_ImageStreamList, + Convert_api_ImageStreamList_To_v1_ImageStreamList, + Convert_v1_ImageStreamMapping_To_api_ImageStreamMapping, + Convert_api_ImageStreamMapping_To_v1_ImageStreamMapping, + Convert_v1_ImageStreamSpec_To_api_ImageStreamSpec, + Convert_api_ImageStreamSpec_To_v1_ImageStreamSpec, + Convert_v1_ImageStreamStatus_To_api_ImageStreamStatus, + Convert_api_ImageStreamStatus_To_v1_ImageStreamStatus, + Convert_v1_ImageStreamTag_To_api_ImageStreamTag, + Convert_api_ImageStreamTag_To_v1_ImageStreamTag, + Convert_v1_ImageStreamTagList_To_api_ImageStreamTagList, + Convert_api_ImageStreamTagList_To_v1_ImageStreamTagList, + Convert_v1_RepositoryImportSpec_To_api_RepositoryImportSpec, + Convert_api_RepositoryImportSpec_To_v1_RepositoryImportSpec, + Convert_v1_RepositoryImportStatus_To_api_RepositoryImportStatus, + Convert_api_RepositoryImportStatus_To_v1_RepositoryImportStatus, + Convert_v1_SignatureCondition_To_api_SignatureCondition, + Convert_api_SignatureCondition_To_v1_SignatureCondition, + Convert_v1_SignatureGenericEntity_To_api_SignatureGenericEntity, + Convert_api_SignatureGenericEntity_To_v1_SignatureGenericEntity, + Convert_v1_SignatureIssuer_To_api_SignatureIssuer, + Convert_api_SignatureIssuer_To_v1_SignatureIssuer, + Convert_v1_SignatureSubject_To_api_SignatureSubject, + Convert_api_SignatureSubject_To_v1_SignatureSubject, + Convert_v1_TagEvent_To_api_TagEvent, + Convert_api_TagEvent_To_v1_TagEvent, + Convert_v1_TagEventCondition_To_api_TagEventCondition, + Convert_api_TagEventCondition_To_v1_TagEventCondition, + Convert_v1_TagImportPolicy_To_api_TagImportPolicy, + Convert_api_TagImportPolicy_To_v1_TagImportPolicy, + Convert_v1_TagReference_To_api_TagReference, + Convert_api_TagReference_To_v1_TagReference, + ); err != nil { + // if one of the conversion functions is malformed, detect it immediately. + panic(err) + } +} + +func autoConvert_v1_DockerImageReference_To_api_DockerImageReference(in *DockerImageReference, out *image_api.DockerImageReference, s conversion.Scope) error { + out.Registry = in.Registry + out.Namespace = in.Namespace + out.Name = in.Name + out.Tag = in.Tag + out.ID = in.ID + return nil +} + +func Convert_v1_DockerImageReference_To_api_DockerImageReference(in *DockerImageReference, out *image_api.DockerImageReference, s conversion.Scope) error { + return autoConvert_v1_DockerImageReference_To_api_DockerImageReference(in, out, s) +} + +func autoConvert_api_DockerImageReference_To_v1_DockerImageReference(in *image_api.DockerImageReference, out *DockerImageReference, s conversion.Scope) error { + out.Registry = in.Registry + out.Namespace = in.Namespace + out.Name = in.Name + out.Tag = in.Tag + out.ID = in.ID + return nil +} + +func Convert_api_DockerImageReference_To_v1_DockerImageReference(in *image_api.DockerImageReference, out *DockerImageReference, s conversion.Scope) error { + return autoConvert_api_DockerImageReference_To_v1_DockerImageReference(in, out, s) +} + +func autoConvert_v1_ImageImportSpec_To_api_ImageImportSpec(in *ImageImportSpec, out *image_api.ImageImportSpec, s conversion.Scope) error { + SetDefaults_ImageImportSpec(in) + if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.From, &out.From, s); err != nil { + return err + } + if in.To != nil { + in, out := &in.To, &out.To + *out = new(api.LocalObjectReference) + if err := api_v1.Convert_v1_LocalObjectReference_To_api_LocalObjectReference(*in, *out, s); err != nil { + return err + } + } else { + out.To = nil + } + if err := Convert_v1_TagImportPolicy_To_api_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil { + return err + } + out.IncludeManifest = in.IncludeManifest + return nil +} + +func Convert_v1_ImageImportSpec_To_api_ImageImportSpec(in *ImageImportSpec, out *image_api.ImageImportSpec, s conversion.Scope) error { + return autoConvert_v1_ImageImportSpec_To_api_ImageImportSpec(in, out, s) +} + +func autoConvert_api_ImageImportSpec_To_v1_ImageImportSpec(in *image_api.ImageImportSpec, out *ImageImportSpec, s conversion.Scope) error { + if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil { + return err + } + if in.To != nil { + in, out := &in.To, &out.To + *out = new(api_v1.LocalObjectReference) + if err := api_v1.Convert_api_LocalObjectReference_To_v1_LocalObjectReference(*in, *out, s); err != nil { + return err + } + } else { + out.To = nil + } + if err := Convert_api_TagImportPolicy_To_v1_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil { + return err + } + out.IncludeManifest = in.IncludeManifest + return nil +} + +func Convert_api_ImageImportSpec_To_v1_ImageImportSpec(in *image_api.ImageImportSpec, out *ImageImportSpec, s conversion.Scope) error { + return autoConvert_api_ImageImportSpec_To_v1_ImageImportSpec(in, out, s) +} + +func autoConvert_v1_ImageImportStatus_To_api_ImageImportStatus(in *ImageImportStatus, out *image_api.ImageImportStatus, s conversion.Scope) error { + out.Status = in.Status + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(image_api.Image) + if err := Convert_v1_Image_To_api_Image(*in, *out, s); err != nil { + return err + } + } else { + out.Image = nil + } + out.Tag = in.Tag + return nil +} + +func Convert_v1_ImageImportStatus_To_api_ImageImportStatus(in *ImageImportStatus, out *image_api.ImageImportStatus, s conversion.Scope) error { + return autoConvert_v1_ImageImportStatus_To_api_ImageImportStatus(in, out, s) +} + +func autoConvert_api_ImageImportStatus_To_v1_ImageImportStatus(in *image_api.ImageImportStatus, out *ImageImportStatus, s conversion.Scope) error { + out.Tag = in.Tag + out.Status = in.Status + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(Image) + if err := Convert_api_Image_To_v1_Image(*in, *out, s); err != nil { + return err + } + } else { + out.Image = nil + } + return nil +} + +func Convert_api_ImageImportStatus_To_v1_ImageImportStatus(in *image_api.ImageImportStatus, out *ImageImportStatus, s conversion.Scope) error { + return autoConvert_api_ImageImportStatus_To_v1_ImageImportStatus(in, out, s) +} + +func autoConvert_v1_ImageLayer_To_api_ImageLayer(in *ImageLayer, out *image_api.ImageLayer, s conversion.Scope) error { + out.Name = in.Name + out.LayerSize = in.LayerSize + out.MediaType = in.MediaType + return nil +} + +func Convert_v1_ImageLayer_To_api_ImageLayer(in *ImageLayer, out *image_api.ImageLayer, s conversion.Scope) error { + return autoConvert_v1_ImageLayer_To_api_ImageLayer(in, out, s) +} + +func autoConvert_api_ImageLayer_To_v1_ImageLayer(in *image_api.ImageLayer, out *ImageLayer, s conversion.Scope) error { + out.Name = in.Name + out.LayerSize = in.LayerSize + out.MediaType = in.MediaType + return nil +} + +func Convert_api_ImageLayer_To_v1_ImageLayer(in *image_api.ImageLayer, out *ImageLayer, s conversion.Scope) error { + return autoConvert_api_ImageLayer_To_v1_ImageLayer(in, out, s) +} + +func autoConvert_v1_ImageList_To_api_ImageList(in *ImageList, out *image_api.ImageList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]image_api.Image, len(*in)) + for i := range *in { + if err := Convert_v1_Image_To_api_Image(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1_ImageList_To_api_ImageList(in *ImageList, out *image_api.ImageList, s conversion.Scope) error { + return autoConvert_v1_ImageList_To_api_ImageList(in, out, s) +} + +func autoConvert_api_ImageList_To_v1_ImageList(in *image_api.ImageList, out *ImageList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Image, len(*in)) + for i := range *in { + if err := Convert_api_Image_To_v1_Image(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_api_ImageList_To_v1_ImageList(in *image_api.ImageList, out *ImageList, s conversion.Scope) error { + return autoConvert_api_ImageList_To_v1_ImageList(in, out, s) +} + +func autoConvert_v1_ImageSignature_To_api_ImageSignature(in *ImageSignature, out *image_api.ImageSignature, s conversion.Scope) error { + out.Type = in.Type + if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Content, &out.Content, s); err != nil { + return err + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]image_api.SignatureCondition, len(*in)) + for i := range *in { + if err := Convert_v1_SignatureCondition_To_api_SignatureCondition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + out.ImageIdentity = in.ImageIdentity + out.SignedClaims = in.SignedClaims + out.Created = in.Created + if in.IssuedBy != nil { + in, out := &in.IssuedBy, &out.IssuedBy + *out = new(image_api.SignatureIssuer) + if err := Convert_v1_SignatureIssuer_To_api_SignatureIssuer(*in, *out, s); err != nil { + return err + } + } else { + out.IssuedBy = nil + } + if in.IssuedTo != nil { + in, out := &in.IssuedTo, &out.IssuedTo + *out = new(image_api.SignatureSubject) + if err := Convert_v1_SignatureSubject_To_api_SignatureSubject(*in, *out, s); err != nil { + return err + } + } else { + out.IssuedTo = nil + } + return nil +} + +func Convert_v1_ImageSignature_To_api_ImageSignature(in *ImageSignature, out *image_api.ImageSignature, s conversion.Scope) error { + return autoConvert_v1_ImageSignature_To_api_ImageSignature(in, out, s) +} + +func autoConvert_api_ImageSignature_To_v1_ImageSignature(in *image_api.ImageSignature, out *ImageSignature, s conversion.Scope) error { + out.Type = in.Type + if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Content, &out.Content, s); err != nil { + return err + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]SignatureCondition, len(*in)) + for i := range *in { + if err := Convert_api_SignatureCondition_To_v1_SignatureCondition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + out.ImageIdentity = in.ImageIdentity + out.SignedClaims = in.SignedClaims + out.Created = in.Created + if in.IssuedBy != nil { + in, out := &in.IssuedBy, &out.IssuedBy + *out = new(SignatureIssuer) + if err := Convert_api_SignatureIssuer_To_v1_SignatureIssuer(*in, *out, s); err != nil { + return err + } + } else { + out.IssuedBy = nil + } + if in.IssuedTo != nil { + in, out := &in.IssuedTo, &out.IssuedTo + *out = new(SignatureSubject) + if err := Convert_api_SignatureSubject_To_v1_SignatureSubject(*in, *out, s); err != nil { + return err + } + } else { + out.IssuedTo = nil + } + return nil +} + +func Convert_api_ImageSignature_To_v1_ImageSignature(in *image_api.ImageSignature, out *ImageSignature, s conversion.Scope) error { + return autoConvert_api_ImageSignature_To_v1_ImageSignature(in, out, s) +} + +func autoConvert_v1_ImageStream_To_api_ImageStream(in *ImageStream, out *image_api.ImageStream, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_v1_ImageStreamSpec_To_api_ImageStreamSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ImageStreamStatus_To_api_ImageStreamStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1_ImageStream_To_api_ImageStream(in *ImageStream, out *image_api.ImageStream, s conversion.Scope) error { + return autoConvert_v1_ImageStream_To_api_ImageStream(in, out, s) +} + +func autoConvert_api_ImageStream_To_v1_ImageStream(in *image_api.ImageStream, out *ImageStream, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_api_ImageStreamSpec_To_v1_ImageStreamSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_api_ImageStreamStatus_To_v1_ImageStreamStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_api_ImageStream_To_v1_ImageStream(in *image_api.ImageStream, out *ImageStream, s conversion.Scope) error { + return autoConvert_api_ImageStream_To_v1_ImageStream(in, out, s) +} + +func autoConvert_v1_ImageStreamImage_To_api_ImageStreamImage(in *ImageStreamImage, out *image_api.ImageStreamImage, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_v1_Image_To_api_Image(&in.Image, &out.Image, s); err != nil { + return err + } + return nil +} + +func Convert_v1_ImageStreamImage_To_api_ImageStreamImage(in *ImageStreamImage, out *image_api.ImageStreamImage, s conversion.Scope) error { + return autoConvert_v1_ImageStreamImage_To_api_ImageStreamImage(in, out, s) +} + +func autoConvert_api_ImageStreamImage_To_v1_ImageStreamImage(in *image_api.ImageStreamImage, out *ImageStreamImage, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_api_Image_To_v1_Image(&in.Image, &out.Image, s); err != nil { + return err + } + return nil +} + +func Convert_api_ImageStreamImage_To_v1_ImageStreamImage(in *image_api.ImageStreamImage, out *ImageStreamImage, s conversion.Scope) error { + return autoConvert_api_ImageStreamImage_To_v1_ImageStreamImage(in, out, s) +} + +func autoConvert_v1_ImageStreamImport_To_api_ImageStreamImport(in *ImageStreamImport, out *image_api.ImageStreamImport, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_v1_ImageStreamImportSpec_To_api_ImageStreamImportSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ImageStreamImportStatus_To_api_ImageStreamImportStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1_ImageStreamImport_To_api_ImageStreamImport(in *ImageStreamImport, out *image_api.ImageStreamImport, s conversion.Scope) error { + return autoConvert_v1_ImageStreamImport_To_api_ImageStreamImport(in, out, s) +} + +func autoConvert_api_ImageStreamImport_To_v1_ImageStreamImport(in *image_api.ImageStreamImport, out *ImageStreamImport, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_api_ImageStreamImportSpec_To_v1_ImageStreamImportSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_api_ImageStreamImportStatus_To_v1_ImageStreamImportStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_api_ImageStreamImport_To_v1_ImageStreamImport(in *image_api.ImageStreamImport, out *ImageStreamImport, s conversion.Scope) error { + return autoConvert_api_ImageStreamImport_To_v1_ImageStreamImport(in, out, s) +} + +func autoConvert_v1_ImageStreamImportSpec_To_api_ImageStreamImportSpec(in *ImageStreamImportSpec, out *image_api.ImageStreamImportSpec, s conversion.Scope) error { + out.Import = in.Import + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(image_api.RepositoryImportSpec) + if err := Convert_v1_RepositoryImportSpec_To_api_RepositoryImportSpec(*in, *out, s); err != nil { + return err + } + } else { + out.Repository = nil + } + if in.Images != nil { + in, out := &in.Images, &out.Images + *out = make([]image_api.ImageImportSpec, len(*in)) + for i := range *in { + if err := Convert_v1_ImageImportSpec_To_api_ImageImportSpec(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Images = nil + } + return nil +} + +func Convert_v1_ImageStreamImportSpec_To_api_ImageStreamImportSpec(in *ImageStreamImportSpec, out *image_api.ImageStreamImportSpec, s conversion.Scope) error { + return autoConvert_v1_ImageStreamImportSpec_To_api_ImageStreamImportSpec(in, out, s) +} + +func autoConvert_api_ImageStreamImportSpec_To_v1_ImageStreamImportSpec(in *image_api.ImageStreamImportSpec, out *ImageStreamImportSpec, s conversion.Scope) error { + out.Import = in.Import + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(RepositoryImportSpec) + if err := Convert_api_RepositoryImportSpec_To_v1_RepositoryImportSpec(*in, *out, s); err != nil { + return err + } + } else { + out.Repository = nil + } + if in.Images != nil { + in, out := &in.Images, &out.Images + *out = make([]ImageImportSpec, len(*in)) + for i := range *in { + if err := Convert_api_ImageImportSpec_To_v1_ImageImportSpec(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Images = nil + } + return nil +} + +func Convert_api_ImageStreamImportSpec_To_v1_ImageStreamImportSpec(in *image_api.ImageStreamImportSpec, out *ImageStreamImportSpec, s conversion.Scope) error { + return autoConvert_api_ImageStreamImportSpec_To_v1_ImageStreamImportSpec(in, out, s) +} + +func autoConvert_v1_ImageStreamImportStatus_To_api_ImageStreamImportStatus(in *ImageStreamImportStatus, out *image_api.ImageStreamImportStatus, s conversion.Scope) error { + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(image_api.ImageStream) + if err := Convert_v1_ImageStream_To_api_ImageStream(*in, *out, s); err != nil { + return err + } + } else { + out.Import = nil + } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(image_api.RepositoryImportStatus) + if err := Convert_v1_RepositoryImportStatus_To_api_RepositoryImportStatus(*in, *out, s); err != nil { + return err + } + } else { + out.Repository = nil + } + if in.Images != nil { + in, out := &in.Images, &out.Images + *out = make([]image_api.ImageImportStatus, len(*in)) + for i := range *in { + if err := Convert_v1_ImageImportStatus_To_api_ImageImportStatus(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Images = nil + } + return nil +} + +func Convert_v1_ImageStreamImportStatus_To_api_ImageStreamImportStatus(in *ImageStreamImportStatus, out *image_api.ImageStreamImportStatus, s conversion.Scope) error { + return autoConvert_v1_ImageStreamImportStatus_To_api_ImageStreamImportStatus(in, out, s) +} + +func autoConvert_api_ImageStreamImportStatus_To_v1_ImageStreamImportStatus(in *image_api.ImageStreamImportStatus, out *ImageStreamImportStatus, s conversion.Scope) error { + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(ImageStream) + if err := Convert_api_ImageStream_To_v1_ImageStream(*in, *out, s); err != nil { + return err + } + } else { + out.Import = nil + } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(RepositoryImportStatus) + if err := Convert_api_RepositoryImportStatus_To_v1_RepositoryImportStatus(*in, *out, s); err != nil { + return err + } + } else { + out.Repository = nil + } + if in.Images != nil { + in, out := &in.Images, &out.Images + *out = make([]ImageImportStatus, len(*in)) + for i := range *in { + if err := Convert_api_ImageImportStatus_To_v1_ImageImportStatus(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Images = nil + } + return nil +} + +func Convert_api_ImageStreamImportStatus_To_v1_ImageStreamImportStatus(in *image_api.ImageStreamImportStatus, out *ImageStreamImportStatus, s conversion.Scope) error { + return autoConvert_api_ImageStreamImportStatus_To_v1_ImageStreamImportStatus(in, out, s) +} + +func autoConvert_v1_ImageStreamList_To_api_ImageStreamList(in *ImageStreamList, out *image_api.ImageStreamList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]image_api.ImageStream, len(*in)) + for i := range *in { + if err := Convert_v1_ImageStream_To_api_ImageStream(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1_ImageStreamList_To_api_ImageStreamList(in *ImageStreamList, out *image_api.ImageStreamList, s conversion.Scope) error { + return autoConvert_v1_ImageStreamList_To_api_ImageStreamList(in, out, s) +} + +func autoConvert_api_ImageStreamList_To_v1_ImageStreamList(in *image_api.ImageStreamList, out *ImageStreamList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ImageStream, len(*in)) + for i := range *in { + if err := Convert_api_ImageStream_To_v1_ImageStream(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_api_ImageStreamList_To_v1_ImageStreamList(in *image_api.ImageStreamList, out *ImageStreamList, s conversion.Scope) error { + return autoConvert_api_ImageStreamList_To_v1_ImageStreamList(in, out, s) +} + +func autoConvert_v1_ImageStreamMapping_To_api_ImageStreamMapping(in *ImageStreamMapping, out *image_api.ImageStreamMapping, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_v1_Image_To_api_Image(&in.Image, &out.Image, s); err != nil { + return err + } + out.Tag = in.Tag + return nil +} + +func autoConvert_v1_ImageStreamTag_To_api_ImageStreamTag(in *ImageStreamTag, out *image_api.ImageStreamTag, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if in.Tag != nil { + in, out := &in.Tag, &out.Tag + *out = new(image_api.TagReference) + if err := Convert_v1_TagReference_To_api_TagReference(*in, *out, s); err != nil { + return err + } + } else { + out.Tag = nil + } + out.Generation = in.Generation + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]image_api.TagEventCondition, len(*in)) + for i := range *in { + if err := Convert_v1_TagEventCondition_To_api_TagEventCondition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + if err := Convert_v1_Image_To_api_Image(&in.Image, &out.Image, s); err != nil { + return err + } + return nil +} + +func Convert_v1_ImageStreamTag_To_api_ImageStreamTag(in *ImageStreamTag, out *image_api.ImageStreamTag, s conversion.Scope) error { + return autoConvert_v1_ImageStreamTag_To_api_ImageStreamTag(in, out, s) +} + +func autoConvert_api_ImageStreamTag_To_v1_ImageStreamTag(in *image_api.ImageStreamTag, out *ImageStreamTag, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if in.Tag != nil { + in, out := &in.Tag, &out.Tag + *out = new(TagReference) + if err := Convert_api_TagReference_To_v1_TagReference(*in, *out, s); err != nil { + return err + } + } else { + out.Tag = nil + } + out.Generation = in.Generation + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]TagEventCondition, len(*in)) + for i := range *in { + if err := Convert_api_TagEventCondition_To_v1_TagEventCondition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + if err := Convert_api_Image_To_v1_Image(&in.Image, &out.Image, s); err != nil { + return err + } + return nil +} + +func Convert_api_ImageStreamTag_To_v1_ImageStreamTag(in *image_api.ImageStreamTag, out *ImageStreamTag, s conversion.Scope) error { + return autoConvert_api_ImageStreamTag_To_v1_ImageStreamTag(in, out, s) +} + +func autoConvert_v1_ImageStreamTagList_To_api_ImageStreamTagList(in *ImageStreamTagList, out *image_api.ImageStreamTagList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]image_api.ImageStreamTag, len(*in)) + for i := range *in { + if err := Convert_v1_ImageStreamTag_To_api_ImageStreamTag(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1_ImageStreamTagList_To_api_ImageStreamTagList(in *ImageStreamTagList, out *image_api.ImageStreamTagList, s conversion.Scope) error { + return autoConvert_v1_ImageStreamTagList_To_api_ImageStreamTagList(in, out, s) +} + +func autoConvert_api_ImageStreamTagList_To_v1_ImageStreamTagList(in *image_api.ImageStreamTagList, out *ImageStreamTagList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ImageStreamTag, len(*in)) + for i := range *in { + if err := Convert_api_ImageStreamTag_To_v1_ImageStreamTag(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_api_ImageStreamTagList_To_v1_ImageStreamTagList(in *image_api.ImageStreamTagList, out *ImageStreamTagList, s conversion.Scope) error { + return autoConvert_api_ImageStreamTagList_To_v1_ImageStreamTagList(in, out, s) +} + +func autoConvert_v1_RepositoryImportSpec_To_api_RepositoryImportSpec(in *RepositoryImportSpec, out *image_api.RepositoryImportSpec, s conversion.Scope) error { + if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.From, &out.From, s); err != nil { + return err + } + if err := Convert_v1_TagImportPolicy_To_api_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil { + return err + } + out.IncludeManifest = in.IncludeManifest + return nil +} + +func Convert_v1_RepositoryImportSpec_To_api_RepositoryImportSpec(in *RepositoryImportSpec, out *image_api.RepositoryImportSpec, s conversion.Scope) error { + return autoConvert_v1_RepositoryImportSpec_To_api_RepositoryImportSpec(in, out, s) +} + +func autoConvert_api_RepositoryImportSpec_To_v1_RepositoryImportSpec(in *image_api.RepositoryImportSpec, out *RepositoryImportSpec, s conversion.Scope) error { + if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil { + return err + } + if err := Convert_api_TagImportPolicy_To_v1_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil { + return err + } + out.IncludeManifest = in.IncludeManifest + return nil +} + +func Convert_api_RepositoryImportSpec_To_v1_RepositoryImportSpec(in *image_api.RepositoryImportSpec, out *RepositoryImportSpec, s conversion.Scope) error { + return autoConvert_api_RepositoryImportSpec_To_v1_RepositoryImportSpec(in, out, s) +} + +func autoConvert_v1_RepositoryImportStatus_To_api_RepositoryImportStatus(in *RepositoryImportStatus, out *image_api.RepositoryImportStatus, s conversion.Scope) error { + out.Status = in.Status + if in.Images != nil { + in, out := &in.Images, &out.Images + *out = make([]image_api.ImageImportStatus, len(*in)) + for i := range *in { + if err := Convert_v1_ImageImportStatus_To_api_ImageImportStatus(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Images = nil + } + out.AdditionalTags = in.AdditionalTags + return nil +} + +func Convert_v1_RepositoryImportStatus_To_api_RepositoryImportStatus(in *RepositoryImportStatus, out *image_api.RepositoryImportStatus, s conversion.Scope) error { + return autoConvert_v1_RepositoryImportStatus_To_api_RepositoryImportStatus(in, out, s) +} + +func autoConvert_api_RepositoryImportStatus_To_v1_RepositoryImportStatus(in *image_api.RepositoryImportStatus, out *RepositoryImportStatus, s conversion.Scope) error { + out.Status = in.Status + if in.Images != nil { + in, out := &in.Images, &out.Images + *out = make([]ImageImportStatus, len(*in)) + for i := range *in { + if err := Convert_api_ImageImportStatus_To_v1_ImageImportStatus(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Images = nil + } + out.AdditionalTags = in.AdditionalTags + return nil +} + +func Convert_api_RepositoryImportStatus_To_v1_RepositoryImportStatus(in *image_api.RepositoryImportStatus, out *RepositoryImportStatus, s conversion.Scope) error { + return autoConvert_api_RepositoryImportStatus_To_v1_RepositoryImportStatus(in, out, s) +} + +func autoConvert_v1_SignatureCondition_To_api_SignatureCondition(in *SignatureCondition, out *image_api.SignatureCondition, s conversion.Scope) error { + out.Type = image_api.SignatureConditionType(in.Type) + out.Status = api.ConditionStatus(in.Status) + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { + return err + } + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { + return err + } + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_v1_SignatureCondition_To_api_SignatureCondition(in *SignatureCondition, out *image_api.SignatureCondition, s conversion.Scope) error { + return autoConvert_v1_SignatureCondition_To_api_SignatureCondition(in, out, s) +} + +func autoConvert_api_SignatureCondition_To_v1_SignatureCondition(in *image_api.SignatureCondition, out *SignatureCondition, s conversion.Scope) error { + out.Type = SignatureConditionType(in.Type) + out.Status = api_v1.ConditionStatus(in.Status) + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { + return err + } + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { + return err + } + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_api_SignatureCondition_To_v1_SignatureCondition(in *image_api.SignatureCondition, out *SignatureCondition, s conversion.Scope) error { + return autoConvert_api_SignatureCondition_To_v1_SignatureCondition(in, out, s) +} + +func autoConvert_v1_SignatureGenericEntity_To_api_SignatureGenericEntity(in *SignatureGenericEntity, out *image_api.SignatureGenericEntity, s conversion.Scope) error { + out.Organization = in.Organization + out.CommonName = in.CommonName + return nil +} + +func Convert_v1_SignatureGenericEntity_To_api_SignatureGenericEntity(in *SignatureGenericEntity, out *image_api.SignatureGenericEntity, s conversion.Scope) error { + return autoConvert_v1_SignatureGenericEntity_To_api_SignatureGenericEntity(in, out, s) +} + +func autoConvert_api_SignatureGenericEntity_To_v1_SignatureGenericEntity(in *image_api.SignatureGenericEntity, out *SignatureGenericEntity, s conversion.Scope) error { + out.Organization = in.Organization + out.CommonName = in.CommonName + return nil +} + +func Convert_api_SignatureGenericEntity_To_v1_SignatureGenericEntity(in *image_api.SignatureGenericEntity, out *SignatureGenericEntity, s conversion.Scope) error { + return autoConvert_api_SignatureGenericEntity_To_v1_SignatureGenericEntity(in, out, s) +} + +func autoConvert_v1_SignatureIssuer_To_api_SignatureIssuer(in *SignatureIssuer, out *image_api.SignatureIssuer, s conversion.Scope) error { + if err := Convert_v1_SignatureGenericEntity_To_api_SignatureGenericEntity(&in.SignatureGenericEntity, &out.SignatureGenericEntity, s); err != nil { + return err + } + return nil +} + +func Convert_v1_SignatureIssuer_To_api_SignatureIssuer(in *SignatureIssuer, out *image_api.SignatureIssuer, s conversion.Scope) error { + return autoConvert_v1_SignatureIssuer_To_api_SignatureIssuer(in, out, s) +} + +func autoConvert_api_SignatureIssuer_To_v1_SignatureIssuer(in *image_api.SignatureIssuer, out *SignatureIssuer, s conversion.Scope) error { + if err := Convert_api_SignatureGenericEntity_To_v1_SignatureGenericEntity(&in.SignatureGenericEntity, &out.SignatureGenericEntity, s); err != nil { + return err + } + return nil +} + +func Convert_api_SignatureIssuer_To_v1_SignatureIssuer(in *image_api.SignatureIssuer, out *SignatureIssuer, s conversion.Scope) error { + return autoConvert_api_SignatureIssuer_To_v1_SignatureIssuer(in, out, s) +} + +func autoConvert_v1_SignatureSubject_To_api_SignatureSubject(in *SignatureSubject, out *image_api.SignatureSubject, s conversion.Scope) error { + if err := Convert_v1_SignatureGenericEntity_To_api_SignatureGenericEntity(&in.SignatureGenericEntity, &out.SignatureGenericEntity, s); err != nil { + return err + } + out.PublicKeyID = in.PublicKeyID + return nil +} + +func Convert_v1_SignatureSubject_To_api_SignatureSubject(in *SignatureSubject, out *image_api.SignatureSubject, s conversion.Scope) error { + return autoConvert_v1_SignatureSubject_To_api_SignatureSubject(in, out, s) +} + +func autoConvert_api_SignatureSubject_To_v1_SignatureSubject(in *image_api.SignatureSubject, out *SignatureSubject, s conversion.Scope) error { + if err := Convert_api_SignatureGenericEntity_To_v1_SignatureGenericEntity(&in.SignatureGenericEntity, &out.SignatureGenericEntity, s); err != nil { + return err + } + out.PublicKeyID = in.PublicKeyID + return nil +} + +func Convert_api_SignatureSubject_To_v1_SignatureSubject(in *image_api.SignatureSubject, out *SignatureSubject, s conversion.Scope) error { + return autoConvert_api_SignatureSubject_To_v1_SignatureSubject(in, out, s) +} + +func autoConvert_v1_TagEvent_To_api_TagEvent(in *TagEvent, out *image_api.TagEvent, s conversion.Scope) error { + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.Created, &out.Created, s); err != nil { + return err + } + out.DockerImageReference = in.DockerImageReference + out.Image = in.Image + out.Generation = in.Generation + return nil +} + +func Convert_v1_TagEvent_To_api_TagEvent(in *TagEvent, out *image_api.TagEvent, s conversion.Scope) error { + return autoConvert_v1_TagEvent_To_api_TagEvent(in, out, s) +} + +func autoConvert_api_TagEvent_To_v1_TagEvent(in *image_api.TagEvent, out *TagEvent, s conversion.Scope) error { + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.Created, &out.Created, s); err != nil { + return err + } + out.DockerImageReference = in.DockerImageReference + out.Image = in.Image + out.Generation = in.Generation + return nil +} + +func Convert_api_TagEvent_To_v1_TagEvent(in *image_api.TagEvent, out *TagEvent, s conversion.Scope) error { + return autoConvert_api_TagEvent_To_v1_TagEvent(in, out, s) +} + +func autoConvert_v1_TagEventCondition_To_api_TagEventCondition(in *TagEventCondition, out *image_api.TagEventCondition, s conversion.Scope) error { + out.Type = image_api.TagEventConditionType(in.Type) + out.Status = api.ConditionStatus(in.Status) + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { + return err + } + out.Reason = in.Reason + out.Message = in.Message + out.Generation = in.Generation + return nil +} + +func Convert_v1_TagEventCondition_To_api_TagEventCondition(in *TagEventCondition, out *image_api.TagEventCondition, s conversion.Scope) error { + return autoConvert_v1_TagEventCondition_To_api_TagEventCondition(in, out, s) +} + +func autoConvert_api_TagEventCondition_To_v1_TagEventCondition(in *image_api.TagEventCondition, out *TagEventCondition, s conversion.Scope) error { + out.Type = TagEventConditionType(in.Type) + out.Status = api_v1.ConditionStatus(in.Status) + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { + return err + } + out.Reason = in.Reason + out.Message = in.Message + out.Generation = in.Generation + return nil +} + +func Convert_api_TagEventCondition_To_v1_TagEventCondition(in *image_api.TagEventCondition, out *TagEventCondition, s conversion.Scope) error { + return autoConvert_api_TagEventCondition_To_v1_TagEventCondition(in, out, s) +} + +func autoConvert_v1_TagImportPolicy_To_api_TagImportPolicy(in *TagImportPolicy, out *image_api.TagImportPolicy, s conversion.Scope) error { + out.Insecure = in.Insecure + out.Scheduled = in.Scheduled + return nil +} + +func Convert_v1_TagImportPolicy_To_api_TagImportPolicy(in *TagImportPolicy, out *image_api.TagImportPolicy, s conversion.Scope) error { + return autoConvert_v1_TagImportPolicy_To_api_TagImportPolicy(in, out, s) +} + +func autoConvert_api_TagImportPolicy_To_v1_TagImportPolicy(in *image_api.TagImportPolicy, out *TagImportPolicy, s conversion.Scope) error { + out.Insecure = in.Insecure + out.Scheduled = in.Scheduled + return nil +} + +func Convert_api_TagImportPolicy_To_v1_TagImportPolicy(in *image_api.TagImportPolicy, out *TagImportPolicy, s conversion.Scope) error { + return autoConvert_api_TagImportPolicy_To_v1_TagImportPolicy(in, out, s) +} + +func autoConvert_v1_TagReference_To_api_TagReference(in *TagReference, out *image_api.TagReference, s conversion.Scope) error { + out.Name = in.Name + out.Annotations = in.Annotations + if in.From != nil { + in, out := &in.From, &out.From + *out = new(api.ObjectReference) + if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(*in, *out, s); err != nil { + return err + } + } else { + out.From = nil + } + out.Reference = in.Reference + out.Generation = in.Generation + if err := Convert_v1_TagImportPolicy_To_api_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil { + return err + } + return nil +} + +func Convert_v1_TagReference_To_api_TagReference(in *TagReference, out *image_api.TagReference, s conversion.Scope) error { + return autoConvert_v1_TagReference_To_api_TagReference(in, out, s) +} + +func autoConvert_api_TagReference_To_v1_TagReference(in *image_api.TagReference, out *TagReference, s conversion.Scope) error { + out.Name = in.Name + out.Annotations = in.Annotations + if in.From != nil { + in, out := &in.From, &out.From + *out = new(api_v1.ObjectReference) + if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(*in, *out, s); err != nil { + return err + } + } else { + out.From = nil + } + out.Reference = in.Reference + out.Generation = in.Generation + if err := Convert_api_TagImportPolicy_To_v1_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil { + return err + } + return nil +} + +func Convert_api_TagReference_To_v1_TagReference(in *image_api.TagReference, out *TagReference, s conversion.Scope) error { + return autoConvert_api_TagReference_To_v1_TagReference(in, out, s) +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/deep_copy_generated.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/deep_copy_generated.go new file mode 100644 index 00000000..b61c4f3e --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/deep_copy_generated.go @@ -0,0 +1,622 @@ +// +build !ignore_autogenerated_openshift + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1 + +import ( + api "k8s.io/kubernetes/pkg/api" + unversioned "k8s.io/kubernetes/pkg/api/unversioned" + api_v1 "k8s.io/kubernetes/pkg/api/v1" + conversion "k8s.io/kubernetes/pkg/conversion" + runtime "k8s.io/kubernetes/pkg/runtime" +) + +func init() { + if err := api.Scheme.AddGeneratedDeepCopyFuncs( + DeepCopy_v1_DockerImageReference, + DeepCopy_v1_Image, + DeepCopy_v1_ImageImportSpec, + DeepCopy_v1_ImageImportStatus, + DeepCopy_v1_ImageLayer, + DeepCopy_v1_ImageList, + DeepCopy_v1_ImageSignature, + DeepCopy_v1_ImageStream, + DeepCopy_v1_ImageStreamImage, + DeepCopy_v1_ImageStreamImport, + DeepCopy_v1_ImageStreamImportSpec, + DeepCopy_v1_ImageStreamImportStatus, + DeepCopy_v1_ImageStreamList, + DeepCopy_v1_ImageStreamMapping, + DeepCopy_v1_ImageStreamSpec, + DeepCopy_v1_ImageStreamStatus, + DeepCopy_v1_ImageStreamTag, + DeepCopy_v1_ImageStreamTagList, + DeepCopy_v1_NamedTagEventList, + DeepCopy_v1_RepositoryImportSpec, + DeepCopy_v1_RepositoryImportStatus, + DeepCopy_v1_SignatureCondition, + DeepCopy_v1_SignatureGenericEntity, + DeepCopy_v1_SignatureIssuer, + DeepCopy_v1_SignatureSubject, + DeepCopy_v1_TagEvent, + DeepCopy_v1_TagEventCondition, + DeepCopy_v1_TagImportPolicy, + DeepCopy_v1_TagReference, + ); err != nil { + // if one of the deep copy functions is malformed, detect it immediately. + panic(err) + } +} + +func DeepCopy_v1_DockerImageReference(in DockerImageReference, out *DockerImageReference, c *conversion.Cloner) error { + out.Registry = in.Registry + out.Namespace = in.Namespace + out.Name = in.Name + out.Tag = in.Tag + out.ID = in.ID + return nil +} + +func DeepCopy_v1_Image(in Image, out *Image, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + out.DockerImageReference = in.DockerImageReference + if err := runtime.DeepCopy_runtime_RawExtension(in.DockerImageMetadata, &out.DockerImageMetadata, c); err != nil { + return err + } + out.DockerImageMetadataVersion = in.DockerImageMetadataVersion + out.DockerImageManifest = in.DockerImageManifest + if in.DockerImageLayers != nil { + in, out := in.DockerImageLayers, &out.DockerImageLayers + *out = make([]ImageLayer, len(in)) + for i := range in { + if err := DeepCopy_v1_ImageLayer(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.DockerImageLayers = nil + } + if in.Signatures != nil { + in, out := in.Signatures, &out.Signatures + *out = make([]ImageSignature, len(in)) + for i := range in { + if err := DeepCopy_v1_ImageSignature(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Signatures = nil + } + if in.DockerImageSignatures != nil { + in, out := in.DockerImageSignatures, &out.DockerImageSignatures + *out = make([][]byte, len(in)) + for i := range in { + if newVal, err := c.DeepCopy(in[i]); err != nil { + return err + } else { + (*out)[i] = newVal.([]byte) + } + } + } else { + out.DockerImageSignatures = nil + } + out.DockerImageManifestMediaType = in.DockerImageManifestMediaType + out.DockerImageConfig = in.DockerImageConfig + return nil +} + +func DeepCopy_v1_ImageImportSpec(in ImageImportSpec, out *ImageImportSpec, c *conversion.Cloner) error { + if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil { + return err + } + if in.To != nil { + in, out := in.To, &out.To + *out = new(api_v1.LocalObjectReference) + if err := api_v1.DeepCopy_v1_LocalObjectReference(*in, *out, c); err != nil { + return err + } + } else { + out.To = nil + } + if err := DeepCopy_v1_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil { + return err + } + out.IncludeManifest = in.IncludeManifest + return nil +} + +func DeepCopy_v1_ImageImportStatus(in ImageImportStatus, out *ImageImportStatus, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_Status(in.Status, &out.Status, c); err != nil { + return err + } + if in.Image != nil { + in, out := in.Image, &out.Image + *out = new(Image) + if err := DeepCopy_v1_Image(*in, *out, c); err != nil { + return err + } + } else { + out.Image = nil + } + out.Tag = in.Tag + return nil +} + +func DeepCopy_v1_ImageLayer(in ImageLayer, out *ImageLayer, c *conversion.Cloner) error { + out.Name = in.Name + out.LayerSize = in.LayerSize + out.MediaType = in.MediaType + return nil +} + +func DeepCopy_v1_ImageList(in ImageList, out *ImageList, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + return err + } + if in.Items != nil { + in, out := in.Items, &out.Items + *out = make([]Image, len(in)) + for i := range in { + if err := DeepCopy_v1_Image(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func DeepCopy_v1_ImageSignature(in ImageSignature, out *ImageSignature, c *conversion.Cloner) error { + out.Type = in.Type + if in.Content != nil { + in, out := in.Content, &out.Content + *out = make([]byte, len(in)) + copy(*out, in) + } else { + out.Content = nil + } + if in.Conditions != nil { + in, out := in.Conditions, &out.Conditions + *out = make([]SignatureCondition, len(in)) + for i := range in { + if err := DeepCopy_v1_SignatureCondition(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + out.ImageIdentity = in.ImageIdentity + if in.SignedClaims != nil { + in, out := in.SignedClaims, &out.SignedClaims + *out = make(map[string]string) + for key, val := range in { + (*out)[key] = val + } + } else { + out.SignedClaims = nil + } + if in.Created != nil { + in, out := in.Created, &out.Created + *out = new(unversioned.Time) + if err := unversioned.DeepCopy_unversioned_Time(*in, *out, c); err != nil { + return err + } + } else { + out.Created = nil + } + if in.IssuedBy != nil { + in, out := in.IssuedBy, &out.IssuedBy + *out = new(SignatureIssuer) + if err := DeepCopy_v1_SignatureIssuer(*in, *out, c); err != nil { + return err + } + } else { + out.IssuedBy = nil + } + if in.IssuedTo != nil { + in, out := in.IssuedTo, &out.IssuedTo + *out = new(SignatureSubject) + if err := DeepCopy_v1_SignatureSubject(*in, *out, c); err != nil { + return err + } + } else { + out.IssuedTo = nil + } + return nil +} + +func DeepCopy_v1_ImageStream(in ImageStream, out *ImageStream, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := DeepCopy_v1_ImageStreamSpec(in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v1_ImageStreamStatus(in.Status, &out.Status, c); err != nil { + return err + } + return nil +} + +func DeepCopy_v1_ImageStreamImage(in ImageStreamImage, out *ImageStreamImage, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := DeepCopy_v1_Image(in.Image, &out.Image, c); err != nil { + return err + } + return nil +} + +func DeepCopy_v1_ImageStreamImport(in ImageStreamImport, out *ImageStreamImport, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := DeepCopy_v1_ImageStreamImportSpec(in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v1_ImageStreamImportStatus(in.Status, &out.Status, c); err != nil { + return err + } + return nil +} + +func DeepCopy_v1_ImageStreamImportSpec(in ImageStreamImportSpec, out *ImageStreamImportSpec, c *conversion.Cloner) error { + out.Import = in.Import + if in.Repository != nil { + in, out := in.Repository, &out.Repository + *out = new(RepositoryImportSpec) + if err := DeepCopy_v1_RepositoryImportSpec(*in, *out, c); err != nil { + return err + } + } else { + out.Repository = nil + } + if in.Images != nil { + in, out := in.Images, &out.Images + *out = make([]ImageImportSpec, len(in)) + for i := range in { + if err := DeepCopy_v1_ImageImportSpec(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Images = nil + } + return nil +} + +func DeepCopy_v1_ImageStreamImportStatus(in ImageStreamImportStatus, out *ImageStreamImportStatus, c *conversion.Cloner) error { + if in.Import != nil { + in, out := in.Import, &out.Import + *out = new(ImageStream) + if err := DeepCopy_v1_ImageStream(*in, *out, c); err != nil { + return err + } + } else { + out.Import = nil + } + if in.Repository != nil { + in, out := in.Repository, &out.Repository + *out = new(RepositoryImportStatus) + if err := DeepCopy_v1_RepositoryImportStatus(*in, *out, c); err != nil { + return err + } + } else { + out.Repository = nil + } + if in.Images != nil { + in, out := in.Images, &out.Images + *out = make([]ImageImportStatus, len(in)) + for i := range in { + if err := DeepCopy_v1_ImageImportStatus(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Images = nil + } + return nil +} + +func DeepCopy_v1_ImageStreamList(in ImageStreamList, out *ImageStreamList, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + return err + } + if in.Items != nil { + in, out := in.Items, &out.Items + *out = make([]ImageStream, len(in)) + for i := range in { + if err := DeepCopy_v1_ImageStream(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func DeepCopy_v1_ImageStreamMapping(in ImageStreamMapping, out *ImageStreamMapping, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := DeepCopy_v1_Image(in.Image, &out.Image, c); err != nil { + return err + } + out.Tag = in.Tag + return nil +} + +func DeepCopy_v1_ImageStreamSpec(in ImageStreamSpec, out *ImageStreamSpec, c *conversion.Cloner) error { + out.DockerImageRepository = in.DockerImageRepository + if in.Tags != nil { + in, out := in.Tags, &out.Tags + *out = make([]TagReference, len(in)) + for i := range in { + if err := DeepCopy_v1_TagReference(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Tags = nil + } + return nil +} + +func DeepCopy_v1_ImageStreamStatus(in ImageStreamStatus, out *ImageStreamStatus, c *conversion.Cloner) error { + out.DockerImageRepository = in.DockerImageRepository + if in.Tags != nil { + in, out := in.Tags, &out.Tags + *out = make([]NamedTagEventList, len(in)) + for i := range in { + if err := DeepCopy_v1_NamedTagEventList(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Tags = nil + } + return nil +} + +func DeepCopy_v1_ImageStreamTag(in ImageStreamTag, out *ImageStreamTag, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if in.Tag != nil { + in, out := in.Tag, &out.Tag + *out = new(TagReference) + if err := DeepCopy_v1_TagReference(*in, *out, c); err != nil { + return err + } + } else { + out.Tag = nil + } + out.Generation = in.Generation + if in.Conditions != nil { + in, out := in.Conditions, &out.Conditions + *out = make([]TagEventCondition, len(in)) + for i := range in { + if err := DeepCopy_v1_TagEventCondition(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + if err := DeepCopy_v1_Image(in.Image, &out.Image, c); err != nil { + return err + } + return nil +} + +func DeepCopy_v1_ImageStreamTagList(in ImageStreamTagList, out *ImageStreamTagList, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + return err + } + if in.Items != nil { + in, out := in.Items, &out.Items + *out = make([]ImageStreamTag, len(in)) + for i := range in { + if err := DeepCopy_v1_ImageStreamTag(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func DeepCopy_v1_NamedTagEventList(in NamedTagEventList, out *NamedTagEventList, c *conversion.Cloner) error { + out.Tag = in.Tag + if in.Items != nil { + in, out := in.Items, &out.Items + *out = make([]TagEvent, len(in)) + for i := range in { + if err := DeepCopy_v1_TagEvent(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + if in.Conditions != nil { + in, out := in.Conditions, &out.Conditions + *out = make([]TagEventCondition, len(in)) + for i := range in { + if err := DeepCopy_v1_TagEventCondition(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +func DeepCopy_v1_RepositoryImportSpec(in RepositoryImportSpec, out *RepositoryImportSpec, c *conversion.Cloner) error { + if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil { + return err + } + if err := DeepCopy_v1_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil { + return err + } + out.IncludeManifest = in.IncludeManifest + return nil +} + +func DeepCopy_v1_RepositoryImportStatus(in RepositoryImportStatus, out *RepositoryImportStatus, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_Status(in.Status, &out.Status, c); err != nil { + return err + } + if in.Images != nil { + in, out := in.Images, &out.Images + *out = make([]ImageImportStatus, len(in)) + for i := range in { + if err := DeepCopy_v1_ImageImportStatus(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Images = nil + } + if in.AdditionalTags != nil { + in, out := in.AdditionalTags, &out.AdditionalTags + *out = make([]string, len(in)) + copy(*out, in) + } else { + out.AdditionalTags = nil + } + return nil +} + +func DeepCopy_v1_SignatureCondition(in SignatureCondition, out *SignatureCondition, c *conversion.Cloner) error { + out.Type = in.Type + out.Status = in.Status + if err := unversioned.DeepCopy_unversioned_Time(in.LastProbeTime, &out.LastProbeTime, c); err != nil { + return err + } + if err := unversioned.DeepCopy_unversioned_Time(in.LastTransitionTime, &out.LastTransitionTime, c); err != nil { + return err + } + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func DeepCopy_v1_SignatureGenericEntity(in SignatureGenericEntity, out *SignatureGenericEntity, c *conversion.Cloner) error { + out.Organization = in.Organization + out.CommonName = in.CommonName + return nil +} + +func DeepCopy_v1_SignatureIssuer(in SignatureIssuer, out *SignatureIssuer, c *conversion.Cloner) error { + if err := DeepCopy_v1_SignatureGenericEntity(in.SignatureGenericEntity, &out.SignatureGenericEntity, c); err != nil { + return err + } + return nil +} + +func DeepCopy_v1_SignatureSubject(in SignatureSubject, out *SignatureSubject, c *conversion.Cloner) error { + if err := DeepCopy_v1_SignatureGenericEntity(in.SignatureGenericEntity, &out.SignatureGenericEntity, c); err != nil { + return err + } + out.PublicKeyID = in.PublicKeyID + return nil +} + +func DeepCopy_v1_TagEvent(in TagEvent, out *TagEvent, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_Time(in.Created, &out.Created, c); err != nil { + return err + } + out.DockerImageReference = in.DockerImageReference + out.Image = in.Image + out.Generation = in.Generation + return nil +} + +func DeepCopy_v1_TagEventCondition(in TagEventCondition, out *TagEventCondition, c *conversion.Cloner) error { + out.Type = in.Type + out.Status = in.Status + if err := unversioned.DeepCopy_unversioned_Time(in.LastTransitionTime, &out.LastTransitionTime, c); err != nil { + return err + } + out.Reason = in.Reason + out.Message = in.Message + out.Generation = in.Generation + return nil +} + +func DeepCopy_v1_TagImportPolicy(in TagImportPolicy, out *TagImportPolicy, c *conversion.Cloner) error { + out.Insecure = in.Insecure + out.Scheduled = in.Scheduled + return nil +} + +func DeepCopy_v1_TagReference(in TagReference, out *TagReference, c *conversion.Cloner) error { + out.Name = in.Name + if in.Annotations != nil { + in, out := in.Annotations, &out.Annotations + *out = make(map[string]string) + for key, val := range in { + (*out)[key] = val + } + } else { + out.Annotations = nil + } + if in.From != nil { + in, out := in.From, &out.From + *out = new(api_v1.ObjectReference) + if err := api_v1.DeepCopy_v1_ObjectReference(*in, *out, c); err != nil { + return err + } + } else { + out.From = nil + } + out.Reference = in.Reference + if in.Generation != nil { + in, out := in.Generation, &out.Generation + *out = new(int64) + **out = *in + } else { + out.Generation = nil + } + if err := DeepCopy_v1_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/defaults.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/defaults.go new file mode 100644 index 00000000..ef92bffa --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/defaults.go @@ -0,0 +1,26 @@ +package v1 + +import ( + newer "github.com/openshift/origin/pkg/image/api" + "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/runtime" +) + +func SetDefaults_ImageImportSpec(obj *ImageImportSpec) { + if obj.To == nil { + if ref, err := newer.ParseDockerImageReference(obj.From.Name); err == nil { + if len(ref.Tag) > 0 { + obj.To = &v1.LocalObjectReference{Name: ref.Tag} + } + } + } +} + +func addDefaultingFuncs(scheme *runtime.Scheme) { + err := scheme.AddDefaultingFuncs( + SetDefaults_ImageImportSpec, + ) + if err != nil { + panic(err) + } +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/doc.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/doc.go new file mode 100644 index 00000000..e887205c --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/doc.go @@ -0,0 +1,3 @@ +// Package v1 is the v1 version of the API. +// +genconversion=true +package v1 diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/generated.pb.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/generated.pb.go new file mode 100644 index 00000000..3bc8f101 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/generated.pb.go @@ -0,0 +1,6705 @@ +// Code generated by protoc-gen-gogo. +// source: github.com/openshift/origin/pkg/image/api/v1/generated.proto +// DO NOT EDIT! + +/* + Package v1 is a generated protocol buffer package. + + It is generated from these files: + github.com/openshift/origin/pkg/image/api/v1/generated.proto + + It has these top-level messages: + DockerImageReference + Image + ImageImportSpec + ImageImportStatus + ImageLayer + ImageList + ImageSignature + ImageStream + ImageStreamImage + ImageStreamImport + ImageStreamImportSpec + ImageStreamImportStatus + ImageStreamList + ImageStreamMapping + ImageStreamSpec + ImageStreamStatus + ImageStreamTag + ImageStreamTagList + NamedTagEventList + RepositoryImportSpec + RepositoryImportStatus + SignatureCondition + SignatureGenericEntity + SignatureIssuer + SignatureSubject + TagEvent + TagEventCondition + TagImportPolicy + TagReference +*/ +package v1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned" +import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func (m *DockerImageReference) Reset() { *m = DockerImageReference{} } +func (m *DockerImageReference) String() string { return proto.CompactTextString(m) } +func (*DockerImageReference) ProtoMessage() {} + +func (m *Image) Reset() { *m = Image{} } +func (m *Image) String() string { return proto.CompactTextString(m) } +func (*Image) ProtoMessage() {} + +func (m *ImageImportSpec) Reset() { *m = ImageImportSpec{} } +func (m *ImageImportSpec) String() string { return proto.CompactTextString(m) } +func (*ImageImportSpec) ProtoMessage() {} + +func (m *ImageImportStatus) Reset() { *m = ImageImportStatus{} } +func (m *ImageImportStatus) String() string { return proto.CompactTextString(m) } +func (*ImageImportStatus) ProtoMessage() {} + +func (m *ImageLayer) Reset() { *m = ImageLayer{} } +func (m *ImageLayer) String() string { return proto.CompactTextString(m) } +func (*ImageLayer) ProtoMessage() {} + +func (m *ImageList) Reset() { *m = ImageList{} } +func (m *ImageList) String() string { return proto.CompactTextString(m) } +func (*ImageList) ProtoMessage() {} + +func (m *ImageSignature) Reset() { *m = ImageSignature{} } +func (m *ImageSignature) String() string { return proto.CompactTextString(m) } +func (*ImageSignature) ProtoMessage() {} + +func (m *ImageStream) Reset() { *m = ImageStream{} } +func (m *ImageStream) String() string { return proto.CompactTextString(m) } +func (*ImageStream) ProtoMessage() {} + +func (m *ImageStreamImage) Reset() { *m = ImageStreamImage{} } +func (m *ImageStreamImage) String() string { return proto.CompactTextString(m) } +func (*ImageStreamImage) ProtoMessage() {} + +func (m *ImageStreamImport) Reset() { *m = ImageStreamImport{} } +func (m *ImageStreamImport) String() string { return proto.CompactTextString(m) } +func (*ImageStreamImport) ProtoMessage() {} + +func (m *ImageStreamImportSpec) Reset() { *m = ImageStreamImportSpec{} } +func (m *ImageStreamImportSpec) String() string { return proto.CompactTextString(m) } +func (*ImageStreamImportSpec) ProtoMessage() {} + +func (m *ImageStreamImportStatus) Reset() { *m = ImageStreamImportStatus{} } +func (m *ImageStreamImportStatus) String() string { return proto.CompactTextString(m) } +func (*ImageStreamImportStatus) ProtoMessage() {} + +func (m *ImageStreamList) Reset() { *m = ImageStreamList{} } +func (m *ImageStreamList) String() string { return proto.CompactTextString(m) } +func (*ImageStreamList) ProtoMessage() {} + +func (m *ImageStreamMapping) Reset() { *m = ImageStreamMapping{} } +func (m *ImageStreamMapping) String() string { return proto.CompactTextString(m) } +func (*ImageStreamMapping) ProtoMessage() {} + +func (m *ImageStreamSpec) Reset() { *m = ImageStreamSpec{} } +func (m *ImageStreamSpec) String() string { return proto.CompactTextString(m) } +func (*ImageStreamSpec) ProtoMessage() {} + +func (m *ImageStreamStatus) Reset() { *m = ImageStreamStatus{} } +func (m *ImageStreamStatus) String() string { return proto.CompactTextString(m) } +func (*ImageStreamStatus) ProtoMessage() {} + +func (m *ImageStreamTag) Reset() { *m = ImageStreamTag{} } +func (m *ImageStreamTag) String() string { return proto.CompactTextString(m) } +func (*ImageStreamTag) ProtoMessage() {} + +func (m *ImageStreamTagList) Reset() { *m = ImageStreamTagList{} } +func (m *ImageStreamTagList) String() string { return proto.CompactTextString(m) } +func (*ImageStreamTagList) ProtoMessage() {} + +func (m *NamedTagEventList) Reset() { *m = NamedTagEventList{} } +func (m *NamedTagEventList) String() string { return proto.CompactTextString(m) } +func (*NamedTagEventList) ProtoMessage() {} + +func (m *RepositoryImportSpec) Reset() { *m = RepositoryImportSpec{} } +func (m *RepositoryImportSpec) String() string { return proto.CompactTextString(m) } +func (*RepositoryImportSpec) ProtoMessage() {} + +func (m *RepositoryImportStatus) Reset() { *m = RepositoryImportStatus{} } +func (m *RepositoryImportStatus) String() string { return proto.CompactTextString(m) } +func (*RepositoryImportStatus) ProtoMessage() {} + +func (m *SignatureCondition) Reset() { *m = SignatureCondition{} } +func (m *SignatureCondition) String() string { return proto.CompactTextString(m) } +func (*SignatureCondition) ProtoMessage() {} + +func (m *SignatureGenericEntity) Reset() { *m = SignatureGenericEntity{} } +func (m *SignatureGenericEntity) String() string { return proto.CompactTextString(m) } +func (*SignatureGenericEntity) ProtoMessage() {} + +func (m *SignatureIssuer) Reset() { *m = SignatureIssuer{} } +func (m *SignatureIssuer) String() string { return proto.CompactTextString(m) } +func (*SignatureIssuer) ProtoMessage() {} + +func (m *SignatureSubject) Reset() { *m = SignatureSubject{} } +func (m *SignatureSubject) String() string { return proto.CompactTextString(m) } +func (*SignatureSubject) ProtoMessage() {} + +func (m *TagEvent) Reset() { *m = TagEvent{} } +func (m *TagEvent) String() string { return proto.CompactTextString(m) } +func (*TagEvent) ProtoMessage() {} + +func (m *TagEventCondition) Reset() { *m = TagEventCondition{} } +func (m *TagEventCondition) String() string { return proto.CompactTextString(m) } +func (*TagEventCondition) ProtoMessage() {} + +func (m *TagImportPolicy) Reset() { *m = TagImportPolicy{} } +func (m *TagImportPolicy) String() string { return proto.CompactTextString(m) } +func (*TagImportPolicy) ProtoMessage() {} + +func (m *TagReference) Reset() { *m = TagReference{} } +func (m *TagReference) String() string { return proto.CompactTextString(m) } +func (*TagReference) ProtoMessage() {} + +func init() { + proto.RegisterType((*DockerImageReference)(nil), "github.com.openshift.origin.pkg.image.api.v1.DockerImageReference") + proto.RegisterType((*Image)(nil), "github.com.openshift.origin.pkg.image.api.v1.Image") + proto.RegisterType((*ImageImportSpec)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageImportSpec") + proto.RegisterType((*ImageImportStatus)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageImportStatus") + proto.RegisterType((*ImageLayer)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageLayer") + proto.RegisterType((*ImageList)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageList") + proto.RegisterType((*ImageSignature)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageSignature") + proto.RegisterType((*ImageStream)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStream") + proto.RegisterType((*ImageStreamImage)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamImage") + proto.RegisterType((*ImageStreamImport)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamImport") + proto.RegisterType((*ImageStreamImportSpec)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamImportSpec") + proto.RegisterType((*ImageStreamImportStatus)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamImportStatus") + proto.RegisterType((*ImageStreamList)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamList") + proto.RegisterType((*ImageStreamMapping)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamMapping") + proto.RegisterType((*ImageStreamSpec)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamSpec") + proto.RegisterType((*ImageStreamStatus)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamStatus") + proto.RegisterType((*ImageStreamTag)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamTag") + proto.RegisterType((*ImageStreamTagList)(nil), "github.com.openshift.origin.pkg.image.api.v1.ImageStreamTagList") + proto.RegisterType((*NamedTagEventList)(nil), "github.com.openshift.origin.pkg.image.api.v1.NamedTagEventList") + proto.RegisterType((*RepositoryImportSpec)(nil), "github.com.openshift.origin.pkg.image.api.v1.RepositoryImportSpec") + proto.RegisterType((*RepositoryImportStatus)(nil), "github.com.openshift.origin.pkg.image.api.v1.RepositoryImportStatus") + proto.RegisterType((*SignatureCondition)(nil), "github.com.openshift.origin.pkg.image.api.v1.SignatureCondition") + proto.RegisterType((*SignatureGenericEntity)(nil), "github.com.openshift.origin.pkg.image.api.v1.SignatureGenericEntity") + proto.RegisterType((*SignatureIssuer)(nil), "github.com.openshift.origin.pkg.image.api.v1.SignatureIssuer") + proto.RegisterType((*SignatureSubject)(nil), "github.com.openshift.origin.pkg.image.api.v1.SignatureSubject") + proto.RegisterType((*TagEvent)(nil), "github.com.openshift.origin.pkg.image.api.v1.TagEvent") + proto.RegisterType((*TagEventCondition)(nil), "github.com.openshift.origin.pkg.image.api.v1.TagEventCondition") + proto.RegisterType((*TagImportPolicy)(nil), "github.com.openshift.origin.pkg.image.api.v1.TagImportPolicy") + proto.RegisterType((*TagReference)(nil), "github.com.openshift.origin.pkg.image.api.v1.TagReference") +} +func (m *DockerImageReference) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DockerImageReference) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Registry))) + i += copy(data[i:], m.Registry) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Tag))) + i += copy(data[i:], m.Tag) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ID))) + i += copy(data[i:], m.ID) + return i, nil +} + +func (m *Image) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Image) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DockerImageReference))) + i += copy(data[i:], m.DockerImageReference) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.DockerImageMetadata.Size())) + n2, err := m.DockerImageMetadata.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DockerImageMetadataVersion))) + i += copy(data[i:], m.DockerImageMetadataVersion) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DockerImageManifest))) + i += copy(data[i:], m.DockerImageManifest) + if len(m.DockerImageLayers) > 0 { + for _, msg := range m.DockerImageLayers { + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Signatures) > 0 { + for _, msg := range m.Signatures { + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.DockerImageSignatures) > 0 { + for _, b := range m.DockerImageSignatures { + data[i] = 0x42 + i++ + i = encodeVarintGenerated(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + data[i] = 0x4a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DockerImageManifestMediaType))) + i += copy(data[i:], m.DockerImageManifestMediaType) + data[i] = 0x52 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DockerImageConfig))) + i += copy(data[i:], m.DockerImageConfig) + return i, nil +} + +func (m *ImageImportSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageImportSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.From.Size())) + n3, err := m.From.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + if m.To != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.To.Size())) + n4, err := m.To.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.ImportPolicy.Size())) + n5, err := m.ImportPolicy.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + data[i] = 0x20 + i++ + if m.IncludeManifest { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} + +func (m *ImageImportStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageImportStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n6, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + if m.Image != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Image.Size())) + n7, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Tag))) + i += copy(data[i:], m.Tag) + return i, nil +} + +func (m *ImageLayer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageLayer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LayerSize)) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.MediaType))) + i += copy(data[i:], m.MediaType) + return i, nil +} + +func (m *ImageList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n8, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageSignature) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageSignature) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + if m.Content != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Content))) + i += copy(data[i:], m.Content) + } + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ImageIdentity))) + i += copy(data[i:], m.ImageIdentity) + if len(m.SignedClaims) > 0 { + for k := range m.SignedClaims { + data[i] = 0x2a + i++ + v := m.SignedClaims[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if m.Created != nil { + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Created.Size())) + n9, err := m.Created.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.IssuedBy != nil { + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(m.IssuedBy.Size())) + n10, err := m.IssuedBy.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.IssuedTo != nil { + data[i] = 0x42 + i++ + i = encodeVarintGenerated(data, i, uint64(m.IssuedTo.Size())) + n11, err := m.IssuedTo.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} + +func (m *ImageStream) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStream) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n12, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n13, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n13 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n14, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n14 + return i, nil +} + +func (m *ImageStreamImage) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamImage) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n15, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n15 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Image.Size())) + n16, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n16 + return i, nil +} + +func (m *ImageStreamImport) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamImport) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n17, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n17 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n18, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n18 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n19, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n19 + return i, nil +} + +func (m *ImageStreamImportSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamImportSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + if m.Import { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + if m.Repository != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Repository.Size())) + n20, err := m.Repository.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if len(m.Images) > 0 { + for _, msg := range m.Images { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageStreamImportStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamImportStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Import != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.Import.Size())) + n21, err := m.Import.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if m.Repository != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Repository.Size())) + n22, err := m.Repository.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n22 + } + if len(m.Images) > 0 { + for _, msg := range m.Images { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageStreamList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n23, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n23 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageStreamMapping) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamMapping) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n24, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n24 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Image.Size())) + n25, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n25 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Tag))) + i += copy(data[i:], m.Tag) + return i, nil +} + +func (m *ImageStreamSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DockerImageRepository))) + i += copy(data[i:], m.DockerImageRepository) + if len(m.Tags) > 0 { + for _, msg := range m.Tags { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageStreamStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DockerImageRepository))) + i += copy(data[i:], m.DockerImageRepository) + if len(m.Tags) > 0 { + for _, msg := range m.Tags { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageStreamTag) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamTag) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n26, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n26 + if m.Tag != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Tag.Size())) + n27, err := m.Tag.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n27 + } + data[i] = 0x18 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Generation)) + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Image.Size())) + n28, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n28 + return i, nil +} + +func (m *ImageStreamTagList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStreamTagList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n29, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n29 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *NamedTagEventList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NamedTagEventList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Tag))) + i += copy(data[i:], m.Tag) + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RepositoryImportSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RepositoryImportSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.From.Size())) + n30, err := m.From.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n30 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ImportPolicy.Size())) + n31, err := m.ImportPolicy.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n31 + data[i] = 0x18 + i++ + if m.IncludeManifest { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} + +func (m *RepositoryImportStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RepositoryImportStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n32, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n32 + if len(m.Images) > 0 { + for _, msg := range m.Images { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.AdditionalTags) > 0 { + for _, s := range m.AdditionalTags { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *SignatureCondition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SignatureCondition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Status))) + i += copy(data[i:], m.Status) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastProbeTime.Size())) + n33, err := m.LastProbeTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n33 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n34, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n34 + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) + return i, nil +} + +func (m *SignatureGenericEntity) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SignatureGenericEntity) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Organization))) + i += copy(data[i:], m.Organization) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.CommonName))) + i += copy(data[i:], m.CommonName) + return i, nil +} + +func (m *SignatureIssuer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SignatureIssuer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.SignatureGenericEntity.Size())) + n35, err := m.SignatureGenericEntity.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n35 + return i, nil +} + +func (m *SignatureSubject) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SignatureSubject) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.SignatureGenericEntity.Size())) + n36, err := m.SignatureGenericEntity.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n36 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.PublicKeyID))) + i += copy(data[i:], m.PublicKeyID) + return i, nil +} + +func (m *TagEvent) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TagEvent) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.Created.Size())) + n37, err := m.Created.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n37 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DockerImageReference))) + i += copy(data[i:], m.DockerImageReference) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Image))) + i += copy(data[i:], m.Image) + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Generation)) + return i, nil +} + +func (m *TagEventCondition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TagEventCondition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Status))) + i += copy(data[i:], m.Status) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n38, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n38 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) + data[i] = 0x30 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Generation)) + return i, nil +} + +func (m *TagImportPolicy) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TagImportPolicy) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + if m.Insecure { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if m.Scheduled { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} + +func (m *TagReference) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TagReference) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x12 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if m.From != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.From.Size())) + n39, err := m.From.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n39 + } + data[i] = 0x20 + i++ + if m.Reference { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + if m.Generation != nil { + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.Generation)) + } + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ImportPolicy.Size())) + n40, err := m.ImportPolicy.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n40 + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *DockerImageReference) Size() (n int) { + var l int + _ = l + l = len(m.Registry) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Tag) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ID) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Image) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DockerImageReference) + n += 1 + l + sovGenerated(uint64(l)) + l = m.DockerImageMetadata.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DockerImageMetadataVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DockerImageManifest) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.DockerImageLayers) > 0 { + for _, e := range m.DockerImageLayers { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Signatures) > 0 { + for _, e := range m.Signatures { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.DockerImageSignatures) > 0 { + for _, b := range m.DockerImageSignatures { + l = len(b) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.DockerImageManifestMediaType) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DockerImageConfig) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ImageImportSpec) Size() (n int) { + var l int + _ = l + l = m.From.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.To != nil { + l = m.To.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.ImportPolicy.Size() + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + return n +} + +func (m *ImageImportStatus) Size() (n int) { + var l int + _ = l + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Tag) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ImageLayer) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.LayerSize)) + l = len(m.MediaType) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ImageList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ImageSignature) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.Content != nil { + l = len(m.Content) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ImageIdentity) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.SignedClaims) > 0 { + for k, v := range m.SignedClaims { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if m.Created != nil { + l = m.Created.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.IssuedBy != nil { + l = m.IssuedBy.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.IssuedTo != nil { + l = m.IssuedTo.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ImageStream) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ImageStreamImage) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Image.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ImageStreamImport) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ImageStreamImportSpec) Size() (n int) { + var l int + _ = l + n += 2 + if m.Repository != nil { + l = m.Repository.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Images) > 0 { + for _, e := range m.Images { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ImageStreamImportStatus) Size() (n int) { + var l int + _ = l + if m.Import != nil { + l = m.Import.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Repository != nil { + l = m.Repository.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Images) > 0 { + for _, e := range m.Images { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ImageStreamList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ImageStreamMapping) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Image.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Tag) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ImageStreamSpec) Size() (n int) { + var l int + _ = l + l = len(m.DockerImageRepository) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Tags) > 0 { + for _, e := range m.Tags { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ImageStreamStatus) Size() (n int) { + var l int + _ = l + l = len(m.DockerImageRepository) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Tags) > 0 { + for _, e := range m.Tags { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ImageStreamTag) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Tag != nil { + l = m.Tag.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 1 + sovGenerated(uint64(m.Generation)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.Image.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ImageStreamTagList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *NamedTagEventList) Size() (n int) { + var l int + _ = l + l = len(m.Tag) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RepositoryImportSpec) Size() (n int) { + var l int + _ = l + l = m.From.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.ImportPolicy.Size() + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + return n +} + +func (m *RepositoryImportStatus) Size() (n int) { + var l int + _ = l + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Images) > 0 { + for _, e := range m.Images { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.AdditionalTags) > 0 { + for _, s := range m.AdditionalTags { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *SignatureCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastProbeTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *SignatureGenericEntity) Size() (n int) { + var l int + _ = l + l = len(m.Organization) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.CommonName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *SignatureIssuer) Size() (n int) { + var l int + _ = l + l = m.SignatureGenericEntity.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *SignatureSubject) Size() (n int) { + var l int + _ = l + l = m.SignatureGenericEntity.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.PublicKeyID) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *TagEvent) Size() (n int) { + var l int + _ = l + l = m.Created.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DockerImageReference) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Image) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + return n +} + +func (m *TagEventCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + return n +} + +func (m *TagImportPolicy) Size() (n int) { + var l int + _ = l + n += 2 + n += 2 + return n +} + +func (m *TagReference) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if m.From != nil { + l = m.From.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + if m.Generation != nil { + n += 1 + sovGenerated(uint64(*m.Generation)) + } + l = m.ImportPolicy.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DockerImageReference) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DockerImageReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DockerImageReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Registry", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Registry = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tag = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ID = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Image) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Image: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageReference", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageReference = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageMetadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DockerImageMetadata.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageMetadataVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageMetadataVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageManifest", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageManifest = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageLayers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageLayers = append(m.DockerImageLayers, ImageLayer{}) + if err := m.DockerImageLayers[len(m.DockerImageLayers)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signatures = append(m.Signatures, ImageSignature{}) + if err := m.Signatures[len(m.Signatures)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageSignatures", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageSignatures = append(m.DockerImageSignatures, make([]byte, postIndex-iNdEx)) + copy(m.DockerImageSignatures[len(m.DockerImageSignatures)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageManifestMediaType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageManifestMediaType = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageConfig", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageConfig = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageImportSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageImportSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageImportSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.From.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.To == nil { + m.To = &k8s_io_kubernetes_pkg_api_v1.LocalObjectReference{} + } + if err := m.To.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImportPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ImportPolicy.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeManifest", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.IncludeManifest = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageImportStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageImportStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageImportStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &Image{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tag = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageLayer) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageLayer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageLayer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LayerSize", wireType) + } + m.LayerSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.LayerSize |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MediaType = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Image{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageSignature) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Content = append(m.Content[:0], data[iNdEx:postIndex]...) + if m.Content == nil { + m.Content = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, SignatureCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageIdentity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageIdentity = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedClaims", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.SignedClaims == nil { + m.SignedClaims = make(map[string]string) + } + m.SignedClaims[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Created == nil { + m.Created = &k8s_io_kubernetes_pkg_api_unversioned.Time{} + } + if err := m.Created.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IssuedBy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IssuedBy == nil { + m.IssuedBy = &SignatureIssuer{} + } + if err := m.IssuedBy.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IssuedTo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IssuedTo == nil { + m.IssuedTo = &SignatureSubject{} + } + if err := m.IssuedTo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStream) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStream: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStream: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamImage) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamImage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamImage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamImport) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamImport: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamImport: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamImportSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamImportSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamImportSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Import", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Import = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Repository == nil { + m.Repository = &RepositoryImportSpec{} + } + if err := m.Repository.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Images = append(m.Images, ImageImportSpec{}) + if err := m.Images[len(m.Images)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamImportStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamImportStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamImportStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Import", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Import == nil { + m.Import = &ImageStream{} + } + if err := m.Import.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Repository == nil { + m.Repository = &RepositoryImportStatus{} + } + if err := m.Repository.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Images = append(m.Images, ImageImportStatus{}) + if err := m.Images[len(m.Images)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ImageStream{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamMapping) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tag = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageRepository", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageRepository = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tags = append(m.Tags, TagReference{}) + if err := m.Tags[len(m.Tags)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageRepository", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageRepository = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tags = append(m.Tags, NamedTagEventList{}) + if err := m.Tags[len(m.Tags)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamTag) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamTag: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamTag: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tag == nil { + m.Tag = &TagReference{} + } + if err := m.Tag.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Generation |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, TagEventCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStreamTagList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStreamTagList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStreamTagList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ImageStreamTag{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedTagEventList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedTagEventList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedTagEventList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tag = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, TagEvent{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, TagEventCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RepositoryImportSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RepositoryImportSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepositoryImportSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.From.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImportPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ImportPolicy.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeManifest", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.IncludeManifest = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RepositoryImportStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RepositoryImportStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepositoryImportStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Images = append(m.Images, ImageImportStatus{}) + if err := m.Images[len(m.Images)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdditionalTags", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdditionalTags = append(m.AdditionalTags, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignatureCondition) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignatureCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignatureCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = SignatureConditionType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastProbeTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignatureGenericEntity) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignatureGenericEntity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignatureGenericEntity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Organization", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Organization = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommonName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CommonName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignatureIssuer) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignatureIssuer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignatureIssuer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignatureGenericEntity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SignatureGenericEntity.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignatureSubject) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignatureSubject: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignatureSubject: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignatureGenericEntity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SignatureGenericEntity.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKeyID = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TagEvent) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TagEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TagEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Created.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerImageReference", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DockerImageReference = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Image = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Generation |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TagEventCondition) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TagEventCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TagEventCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = TagEventConditionType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Generation |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TagImportPolicy) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TagImportPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TagImportPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Insecure = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Scheduled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Scheduled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TagReference) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TagReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TagReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.From == nil { + m.From = &k8s_io_kubernetes_pkg_api_v1.ObjectReference{} + } + if err := m.From.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Reference = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Generation = &v + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImportPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ImportPolicy.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/generated.proto b/vendor/github.com/openshift/origin/pkg/image/api/v1/generated.proto new file mode 100644 index 00000000..83b15114 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/generated.proto @@ -0,0 +1,434 @@ + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package github.com.openshift.origin.pkg.image.api.v1; + +import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; +import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/runtime/generated.proto"; +import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// DockerImageReference points to a Docker image. +message DockerImageReference { + // Registry is the registry that contains the Docker image + optional string registry = 1; + + // Namespace is the namespace that contains the Docker image + optional string namespace = 2; + + // Name is the name of the Docker image + optional string name = 3; + + // Tag is which tag of the Docker image is being referenced + optional string tag = 4; + + // ID is the identifier for the Docker image + optional string iD = 5; +} + +// Image is an immutable representation of a Docker image and metadata at a point in time. +message Image { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + + // DockerImageReference is the string that can be used to pull this image. + optional string dockerImageReference = 2; + + // DockerImageMetadata contains metadata about this image + optional k8s.io.kubernetes.pkg.runtime.RawExtension dockerImageMetadata = 3; + + // DockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" + optional string dockerImageMetadataVersion = 4; + + // DockerImageManifest is the raw JSON of the manifest + optional string dockerImageManifest = 5; + + // DockerImageLayers represents the layers in the image. May not be set if the image does not define that data. + repeated ImageLayer dockerImageLayers = 6; + + // Signatures holds all signatures of the image. + repeated ImageSignature signatures = 7; + + // DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. + repeated bytes dockerImageSignatures = 8; + + // DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. + optional string dockerImageManifestMediaType = 9; + + // DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. + optional string dockerImageConfig = 10; +} + +// ImageImportSpec describes a request to import a specific image. +message ImageImportSpec { + // From is the source of an image to import; only kind DockerImage is allowed + optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 1; + + // To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used + optional k8s.io.kubernetes.pkg.api.v1.LocalObjectReference to = 2; + + // ImportPolicy is the policy controlling how the image is imported + optional TagImportPolicy importPolicy = 3; + + // IncludeManifest determines if the manifest for each image is returned in the response + optional bool includeManifest = 4; +} + +// ImageImportStatus describes the result of an image import. +message ImageImportStatus { + // Status is the status of the image import, including errors encountered while retrieving the image + optional k8s.io.kubernetes.pkg.api.unversioned.Status status = 1; + + // Image is the metadata of that image, if the image was located + optional Image image = 2; + + // Tag is the tag this image was located under, if any + optional string tag = 3; +} + +// ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none. +message ImageLayer { + // Name of the layer as defined by the underlying store. + optional string name = 1; + + // Size of the layer in bytes as defined by the underlying store. + optional int64 size = 2; + + // MediaType of the referenced object. + optional string mediaType = 3; +} + +// ImageList is a list of Image objects. +message ImageList { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + + // Items is a list of images + repeated Image items = 2; +} + +// ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims +// as long as the signature is trusted. Based on this information it is possible to restrict runnable images +// to those matching cluster-wide policy. +// There are two mandatory fields provided by client: Type and Content. They should be parsed by clients doing +// image verification. The others are parsed from signature's content by the server. They serve just an +// informative purpose. +message ImageSignature { + // Required: Describes a type of stored blob. + optional string type = 1; + + // Required: An opaque binary string which is an image's signature. + optional bytes content = 2; + + // Conditions represent the latest available observations of a signature's current state. + repeated SignatureCondition conditions = 3; + + // A human readable string representing image's identity. It could be a product name and version, or an + // image pull spec (e.g. "registry.access.redhat.com/rhel7/rhel:7.2"). + optional string imageIdentity = 4; + + // Contains claims from the signature. + map signedClaims = 5; + + // If specified, it is the time of signature's creation. + optional k8s.io.kubernetes.pkg.api.unversioned.Time created = 6; + + // If specified, it holds information about an issuer of signing certificate or key (a person or entity + // who signed the signing certificate or key). + optional SignatureIssuer issuedBy = 7; + + // If specified, it holds information about a subject of signing certificate or key (a person or entity + // who signed the image). + optional SignatureSubject issuedTo = 8; +} + +// ImageStream stores a mapping of tags to images, metadata overrides that are applied +// when images are tagged in a stream, and an optional reference to a Docker image +// repository on a registry. +message ImageStream { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + + // Spec describes the desired state of this stream + optional ImageStreamSpec spec = 2; + + // Status describes the current state of this stream + optional ImageStreamStatus status = 3; +} + +// ImageStreamImage represents an Image that is retrieved by image name from an ImageStream. +message ImageStreamImage { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + + // Image associated with the ImageStream and image name. + optional Image image = 2; +} + +// ImageStreamImport imports an image from remote repositories into OpenShift. +message ImageStreamImport { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + + // Spec is a description of the images that the user wishes to import + optional ImageStreamImportSpec spec = 2; + + // Status is the the result of importing the image + optional ImageStreamImportStatus status = 3; +} + +// ImageStreamImportSpec defines what images should be imported. +message ImageStreamImportSpec { + // Import indicates whether to perform an import - if so, the specified tags are set on the spec + // and status of the image stream defined by the type meta. + optional bool import = 1; + + // Repository is an optional import of an entire Docker image repository. A maximum limit on the + // number of tags imported this way is imposed by the server. + optional RepositoryImportSpec repository = 2; + + // Images are a list of individual images to import. + repeated ImageImportSpec images = 3; +} + +// ImageStreamImportStatus contains information about the status of an image stream import. +message ImageStreamImportStatus { + // Import is the image stream that was successfully updated or created when 'to' was set. + optional ImageStream import = 1; + + // Repository is set if spec.repository was set to the outcome of the import + optional RepositoryImportStatus repository = 2; + + // Images is set with the result of importing spec.images + repeated ImageImportStatus images = 3; +} + +// ImageStreamList is a list of ImageStream objects. +message ImageStreamList { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + + // Items is a list of imageStreams + repeated ImageStream items = 2; +} + +// ImageStreamMapping represents a mapping from a single tag to a Docker image as +// well as the reference to the Docker image stream the image came from. +message ImageStreamMapping { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + + // Image is a Docker image. + optional Image image = 2; + + // Tag is a string value this image can be located with inside the stream. + optional string tag = 3; +} + +// ImageStreamSpec represents options for ImageStreams. +message ImageStreamSpec { + // DockerImageRepository is optional, if specified this stream is backed by a Docker repository on this server + optional string dockerImageRepository = 1; + + // Tags map arbitrary string values to specific image locators + repeated TagReference tags = 2; +} + +// ImageStreamStatus contains information about the state of this image stream. +message ImageStreamStatus { + // DockerImageRepository represents the effective location this stream may be accessed at. + // May be empty until the server determines where the repository is located + optional string dockerImageRepository = 1; + + // Tags are a historical record of images associated with each tag. The first entry in the + // TagEvent array is the currently tagged image. + repeated NamedTagEventList tags = 2; +} + +// ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream. +message ImageStreamTag { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + + // Tag is the spec tag associated with this image stream tag, and it may be null + // if only pushes have occurred to this image stream. + optional TagReference tag = 2; + + // Generation is the current generation of the tagged image - if tag is provided + // and this value is not equal to the tag generation, a user has requested an + // import that has not completed, or Conditions will be filled out indicating any + // error. + optional int64 generation = 3; + + // Conditions is an array of conditions that apply to the image stream tag. + repeated TagEventCondition conditions = 4; + + // Image associated with the ImageStream and tag. + optional Image image = 5; +} + +// ImageStreamTagList is a list of ImageStreamTag objects. +message ImageStreamTagList { + // Standard object's metadata. + optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + + // Items is the list of image stream tags + repeated ImageStreamTag items = 2; +} + +// NamedTagEventList relates a tag to its image history. +message NamedTagEventList { + // Tag is the tag for which the history is recorded + optional string tag = 1; + + // Standard object's metadata. + repeated TagEvent items = 2; + + // Conditions is an array of conditions that apply to the tag event list. + repeated TagEventCondition conditions = 3; +} + +// RepositoryImportSpec describes a request to import images from a Docker image repository. +message RepositoryImportSpec { + // From is the source for the image repository to import; only kind DockerImage and a name of a Docker image repository is allowed + optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 1; + + // ImportPolicy is the policy controlling how the image is imported + optional TagImportPolicy importPolicy = 2; + + // IncludeManifest determines if the manifest for each image is returned in the response + optional bool includeManifest = 3; +} + +// RepositoryImportStatus describes the result of an image repository import +message RepositoryImportStatus { + // Status reflects whether any failure occurred during import + optional k8s.io.kubernetes.pkg.api.unversioned.Status status = 1; + + // Images is a list of images successfully retrieved by the import of the repository. + repeated ImageImportStatus images = 2; + + // AdditionalTags are tags that exist in the repository but were not imported because + // a maximum limit of automatic imports was applied. + repeated string additionalTags = 3; +} + +// SignatureCondition describes an image signature condition of particular kind at particular probe time. +message SignatureCondition { + // Type of job condition, Complete or Failed. + optional string type = 1; + + // Status of the condition, one of True, False, Unknown. + optional string status = 2; + + // Last time the condition was checked. + optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3; + + // Last time the condition transit from one status to another. + optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4; + + // (brief) reason for the condition's last transition. + optional string reason = 5; + + // Human readable message indicating details about last transition. + optional string message = 6; +} + +// SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject +// of signing certificate or key. +message SignatureGenericEntity { + // Organization name. + optional string organization = 1; + + // Common name (e.g. openshift-signing-service). + optional string commonName = 2; +} + +// SignatureIssuer holds information about an issuer of signing certificate or key. +message SignatureIssuer { + optional SignatureGenericEntity signatureGenericEntity = 1; +} + +// SignatureSubject holds information about a person or entity who created the signature. +message SignatureSubject { + optional SignatureGenericEntity signatureGenericEntity = 1; + + // If present, it is a human readable key id of public key belonging to the subject used to verify image + // signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g. + // 0x685ebe62bf278440). + optional string publicKeyID = 2; +} + +// TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag. +message TagEvent { + // Created holds the time the TagEvent was created + optional k8s.io.kubernetes.pkg.api.unversioned.Time created = 1; + + // DockerImageReference is the string that can be used to pull this image + optional string dockerImageReference = 2; + + // Image is the image + optional string image = 3; + + // Generation is the spec tag generation that resulted in this tag being updated + optional int64 generation = 4; +} + +// TagEventCondition contains condition information for a tag event. +message TagEventCondition { + // Type of tag event condition, currently only ImportSuccess + optional string type = 1; + + // Status of the condition, one of True, False, Unknown. + optional string status = 2; + + // LastTransitionTIme is the time the condition transitioned from one status to another. + optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 3; + + // Reason is a brief machine readable explanation for the condition's last transition. + optional string reason = 4; + + // Message is a human readable description of the details about last transition, complementing reason. + optional string message = 5; + + // Generation is the spec tag generation that this status corresponds to + optional int64 generation = 6; +} + +// TagImportPolicy describes the tag import policy +message TagImportPolicy { + // Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. + optional bool insecure = 1; + + // Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported + optional bool scheduled = 2; +} + +// TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track. +message TagReference { + // Name of the tag + optional string name = 1; + + // Annotations associated with images using this tag + map annotations = 2; + + // From is a reference to an image stream tag or image stream this tag should track + optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 3; + + // Reference states if the tag will be imported. Default value is false, which means the tag will be imported. + optional bool reference = 4; + + // Generation is the image stream generation that updated this tag - setting it to 0 is an indication that the generation must be updated. + // Legacy clients will send this as nil, which means the client doesn't know or care. + optional int64 generation = 5; + + // Import is information that controls how images may be imported by the server. + optional TagImportPolicy importPolicy = 6; +} + diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/register.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/register.go new file mode 100644 index 00000000..74189d47 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/register.go @@ -0,0 +1,47 @@ +package v1 + +import ( + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/runtime" + + "github.com/openshift/origin/pkg/image/api/docker10" + "github.com/openshift/origin/pkg/image/api/dockerpre012" +) + +const GroupName = "" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"} + +func AddToScheme(scheme *runtime.Scheme) { + docker10.AddToScheme(scheme) + dockerpre012.AddToScheme(scheme) + addKnownTypes(scheme) + addDefaultingFuncs(scheme) + addConversionFuncs(scheme) +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) { + scheme.AddKnownTypes(SchemeGroupVersion, + &Image{}, + &ImageList{}, + &ImageStream{}, + &ImageStreamList{}, + &ImageStreamMapping{}, + &ImageStreamTag{}, + &ImageStreamTagList{}, + &ImageStreamImage{}, + &ImageStreamImport{}, + ) +} + +func (obj *Image) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ImageList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ImageStream) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ImageStreamList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ImageStreamMapping) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ImageStreamTag) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ImageStreamTagList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ImageStreamImage) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ImageStreamImport) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/swagger_doc.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/swagger_doc.go new file mode 100644 index 00000000..27d8382d --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/swagger_doc.go @@ -0,0 +1,339 @@ +package v1 + +// This file contains methods that can be used by the go-restful package to generate Swagger +// documentation for the object types found in 'types.go' This file is automatically generated +// by hack/update-generated-swagger-descriptions.sh and should be run after a full build of OpenShift. +// ==== DO NOT EDIT THIS FILE MANUALLY ==== + +var map_DockerImageReference = map[string]string{ + "": "DockerImageReference points to a Docker image.", + "Registry": "Registry is the registry that contains the Docker image", + "Namespace": "Namespace is the namespace that contains the Docker image", + "Name": "Name is the name of the Docker image", + "Tag": "Tag is which tag of the Docker image is being referenced", + "ID": "ID is the identifier for the Docker image", +} + +func (DockerImageReference) SwaggerDoc() map[string]string { + return map_DockerImageReference +} + +var map_Image = map[string]string{ + "": "Image is an immutable representation of a Docker image and metadata at a point in time.", + "metadata": "Standard object's metadata.", + "dockerImageReference": "DockerImageReference is the string that can be used to pull this image.", + "dockerImageMetadata": "DockerImageMetadata contains metadata about this image", + "dockerImageMetadataVersion": "DockerImageMetadataVersion conveys the version of the object, which if empty defaults to \"1.0\"", + "dockerImageManifest": "DockerImageManifest is the raw JSON of the manifest", + "dockerImageLayers": "DockerImageLayers represents the layers in the image. May not be set if the image does not define that data.", + "signatures": "Signatures holds all signatures of the image.", + "dockerImageSignatures": "DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.", + "dockerImageManifestMediaType": "DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2.", + "dockerImageConfig": "DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2.", +} + +func (Image) SwaggerDoc() map[string]string { + return map_Image +} + +var map_ImageImportSpec = map[string]string{ + "": "ImageImportSpec describes a request to import a specific image.", + "from": "From is the source of an image to import; only kind DockerImage is allowed", + "to": "To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used", + "importPolicy": "ImportPolicy is the policy controlling how the image is imported", + "includeManifest": "IncludeManifest determines if the manifest for each image is returned in the response", +} + +func (ImageImportSpec) SwaggerDoc() map[string]string { + return map_ImageImportSpec +} + +var map_ImageImportStatus = map[string]string{ + "": "ImageImportStatus describes the result of an image import.", + "status": "Status is the status of the image import, including errors encountered while retrieving the image", + "image": "Image is the metadata of that image, if the image was located", + "tag": "Tag is the tag this image was located under, if any", +} + +func (ImageImportStatus) SwaggerDoc() map[string]string { + return map_ImageImportStatus +} + +var map_ImageLayer = map[string]string{ + "": "ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none.", + "name": "Name of the layer as defined by the underlying store.", + "size": "Size of the layer in bytes as defined by the underlying store.", + "mediaType": "MediaType of the referenced object.", +} + +func (ImageLayer) SwaggerDoc() map[string]string { + return map_ImageLayer +} + +var map_ImageList = map[string]string{ + "": "ImageList is a list of Image objects.", + "metadata": "Standard object's metadata.", + "items": "Items is a list of images", +} + +func (ImageList) SwaggerDoc() map[string]string { + return map_ImageList +} + +var map_ImageSignature = map[string]string{ + "": "ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims as long as the signature is trusted. Based on this information it is possible to restrict runnable images to those matching cluster-wide policy. There are two mandatory fields provided by client: Type and Content. They should be parsed by clients doing image verification. The others are parsed from signature's content by the server. They serve just an informative purpose.", + "type": "Required: Describes a type of stored blob.", + "content": "Required: An opaque binary string which is an image's signature.", + "conditions": "Conditions represent the latest available observations of a signature's current state.", + "imageIdentity": "A human readable string representing image's identity. It could be a product name and version, or an image pull spec (e.g. \"registry.access.redhat.com/rhel7/rhel:7.2\").", + "signedClaims": "Contains claims from the signature.", + "created": "If specified, it is the time of signature's creation.", + "issuedBy": "If specified, it holds information about an issuer of signing certificate or key (a person or entity who signed the signing certificate or key).", + "issuedTo": "If specified, it holds information about a subject of signing certificate or key (a person or entity who signed the image).", +} + +func (ImageSignature) SwaggerDoc() map[string]string { + return map_ImageSignature +} + +var map_ImageStream = map[string]string{ + "": "ImageStream stores a mapping of tags to images, metadata overrides that are applied when images are tagged in a stream, and an optional reference to a Docker image repository on a registry.", + "metadata": "Standard object's metadata.", + "spec": "Spec describes the desired state of this stream", + "status": "Status describes the current state of this stream", +} + +func (ImageStream) SwaggerDoc() map[string]string { + return map_ImageStream +} + +var map_ImageStreamImage = map[string]string{ + "": "ImageStreamImage represents an Image that is retrieved by image name from an ImageStream.", + "metadata": "Standard object's metadata.", + "image": "Image associated with the ImageStream and image name.", +} + +func (ImageStreamImage) SwaggerDoc() map[string]string { + return map_ImageStreamImage +} + +var map_ImageStreamImport = map[string]string{ + "": "ImageStreamImport imports an image from remote repositories into OpenShift.", + "metadata": "Standard object's metadata.", + "spec": "Spec is a description of the images that the user wishes to import", + "status": "Status is the the result of importing the image", +} + +func (ImageStreamImport) SwaggerDoc() map[string]string { + return map_ImageStreamImport +} + +var map_ImageStreamImportSpec = map[string]string{ + "": "ImageStreamImportSpec defines what images should be imported.", + "import": "Import indicates whether to perform an import - if so, the specified tags are set on the spec and status of the image stream defined by the type meta.", + "repository": "Repository is an optional import of an entire Docker image repository. A maximum limit on the number of tags imported this way is imposed by the server.", + "images": "Images are a list of individual images to import.", +} + +func (ImageStreamImportSpec) SwaggerDoc() map[string]string { + return map_ImageStreamImportSpec +} + +var map_ImageStreamImportStatus = map[string]string{ + "": "ImageStreamImportStatus contains information about the status of an image stream import.", + "import": "Import is the image stream that was successfully updated or created when 'to' was set.", + "repository": "Repository is set if spec.repository was set to the outcome of the import", + "images": "Images is set with the result of importing spec.images", +} + +func (ImageStreamImportStatus) SwaggerDoc() map[string]string { + return map_ImageStreamImportStatus +} + +var map_ImageStreamList = map[string]string{ + "": "ImageStreamList is a list of ImageStream objects.", + "metadata": "Standard object's metadata.", + "items": "Items is a list of imageStreams", +} + +func (ImageStreamList) SwaggerDoc() map[string]string { + return map_ImageStreamList +} + +var map_ImageStreamMapping = map[string]string{ + "": "ImageStreamMapping represents a mapping from a single tag to a Docker image as well as the reference to the Docker image stream the image came from.", + "metadata": "Standard object's metadata.", + "image": "Image is a Docker image.", + "tag": "Tag is a string value this image can be located with inside the stream.", +} + +func (ImageStreamMapping) SwaggerDoc() map[string]string { + return map_ImageStreamMapping +} + +var map_ImageStreamSpec = map[string]string{ + "": "ImageStreamSpec represents options for ImageStreams.", + "dockerImageRepository": "DockerImageRepository is optional, if specified this stream is backed by a Docker repository on this server", + "tags": "Tags map arbitrary string values to specific image locators", +} + +func (ImageStreamSpec) SwaggerDoc() map[string]string { + return map_ImageStreamSpec +} + +var map_ImageStreamStatus = map[string]string{ + "": "ImageStreamStatus contains information about the state of this image stream.", + "dockerImageRepository": "DockerImageRepository represents the effective location this stream may be accessed at. May be empty until the server determines where the repository is located", + "tags": "Tags are a historical record of images associated with each tag. The first entry in the TagEvent array is the currently tagged image.", +} + +func (ImageStreamStatus) SwaggerDoc() map[string]string { + return map_ImageStreamStatus +} + +var map_ImageStreamTag = map[string]string{ + "": "ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream.", + "metadata": "Standard object's metadata.", + "tag": "Tag is the spec tag associated with this image stream tag, and it may be null if only pushes have occurred to this image stream.", + "generation": "Generation is the current generation of the tagged image - if tag is provided and this value is not equal to the tag generation, a user has requested an import that has not completed, or Conditions will be filled out indicating any error.", + "conditions": "Conditions is an array of conditions that apply to the image stream tag.", + "image": "Image associated with the ImageStream and tag.", +} + +func (ImageStreamTag) SwaggerDoc() map[string]string { + return map_ImageStreamTag +} + +var map_ImageStreamTagList = map[string]string{ + "": "ImageStreamTagList is a list of ImageStreamTag objects.", + "metadata": "Standard object's metadata.", + "items": "Items is the list of image stream tags", +} + +func (ImageStreamTagList) SwaggerDoc() map[string]string { + return map_ImageStreamTagList +} + +var map_NamedTagEventList = map[string]string{ + "": "NamedTagEventList relates a tag to its image history.", + "tag": "Tag is the tag for which the history is recorded", + "items": "Standard object's metadata.", + "conditions": "Conditions is an array of conditions that apply to the tag event list.", +} + +func (NamedTagEventList) SwaggerDoc() map[string]string { + return map_NamedTagEventList +} + +var map_RepositoryImportSpec = map[string]string{ + "": "RepositoryImportSpec describes a request to import images from a Docker image repository.", + "from": "From is the source for the image repository to import; only kind DockerImage and a name of a Docker image repository is allowed", + "importPolicy": "ImportPolicy is the policy controlling how the image is imported", + "includeManifest": "IncludeManifest determines if the manifest for each image is returned in the response", +} + +func (RepositoryImportSpec) SwaggerDoc() map[string]string { + return map_RepositoryImportSpec +} + +var map_RepositoryImportStatus = map[string]string{ + "": "RepositoryImportStatus describes the result of an image repository import", + "status": "Status reflects whether any failure occurred during import", + "images": "Images is a list of images successfully retrieved by the import of the repository.", + "additionalTags": "AdditionalTags are tags that exist in the repository but were not imported because a maximum limit of automatic imports was applied.", +} + +func (RepositoryImportStatus) SwaggerDoc() map[string]string { + return map_RepositoryImportStatus +} + +var map_SignatureCondition = map[string]string{ + "": "SignatureCondition describes an image signature condition of particular kind at particular probe time.", + "type": "Type of job condition, Complete or Failed.", + "status": "Status of the condition, one of True, False, Unknown.", + "lastProbeTime": "Last time the condition was checked.", + "lastTransitionTime": "Last time the condition transit from one status to another.", + "reason": "(brief) reason for the condition's last transition.", + "message": "Human readable message indicating details about last transition.", +} + +func (SignatureCondition) SwaggerDoc() map[string]string { + return map_SignatureCondition +} + +var map_SignatureGenericEntity = map[string]string{ + "": "SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject of signing certificate or key.", + "organization": "Organization name.", + "commonName": "Common name (e.g. openshift-signing-service).", +} + +func (SignatureGenericEntity) SwaggerDoc() map[string]string { + return map_SignatureGenericEntity +} + +var map_SignatureIssuer = map[string]string{ + "": "SignatureIssuer holds information about an issuer of signing certificate or key.", +} + +func (SignatureIssuer) SwaggerDoc() map[string]string { + return map_SignatureIssuer +} + +var map_SignatureSubject = map[string]string{ + "": "SignatureSubject holds information about a person or entity who created the signature.", + "publicKeyID": "If present, it is a human readable key id of public key belonging to the subject used to verify image signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g. 0x685ebe62bf278440).", +} + +func (SignatureSubject) SwaggerDoc() map[string]string { + return map_SignatureSubject +} + +var map_TagEvent = map[string]string{ + "": "TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag.", + "created": "Created holds the time the TagEvent was created", + "dockerImageReference": "DockerImageReference is the string that can be used to pull this image", + "image": "Image is the image", + "generation": "Generation is the spec tag generation that resulted in this tag being updated", +} + +func (TagEvent) SwaggerDoc() map[string]string { + return map_TagEvent +} + +var map_TagEventCondition = map[string]string{ + "": "TagEventCondition contains condition information for a tag event.", + "type": "Type of tag event condition, currently only ImportSuccess", + "status": "Status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "LastTransitionTIme is the time the condition transitioned from one status to another.", + "reason": "Reason is a brief machine readable explanation for the condition's last transition.", + "message": "Message is a human readable description of the details about last transition, complementing reason.", + "generation": "Generation is the spec tag generation that this status corresponds to", +} + +func (TagEventCondition) SwaggerDoc() map[string]string { + return map_TagEventCondition +} + +var map_TagImportPolicy = map[string]string{ + "": "TagImportPolicy describes the tag import policy", + "insecure": "Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import.", + "scheduled": "Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported", +} + +func (TagImportPolicy) SwaggerDoc() map[string]string { + return map_TagImportPolicy +} + +var map_TagReference = map[string]string{ + "": "TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track.", + "name": "Name of the tag", + "annotations": "Annotations associated with images using this tag", + "from": "From is a reference to an image stream tag or image stream this tag should track", + "reference": "Reference states if the tag will be imported. Default value is false, which means the tag will be imported.", + "generation": "Generation is the image stream generation that updated this tag - setting it to 0 is an indication that the generation must be updated. Legacy clients will send this as nil, which means the client doesn't know or care.", + "importPolicy": "Import is information that controls how images may be imported by the server.", +} + +func (TagReference) SwaggerDoc() map[string]string { + return map_TagReference +} diff --git a/vendor/github.com/openshift/origin/pkg/image/api/v1/types.go b/vendor/github.com/openshift/origin/pkg/image/api/v1/types.go new file mode 100644 index 00000000..96c8d8b1 --- /dev/null +++ b/vendor/github.com/openshift/origin/pkg/image/api/v1/types.go @@ -0,0 +1,391 @@ +package v1 + +import ( + "k8s.io/kubernetes/pkg/api/unversioned" + kapi "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/runtime" +) + +// ImageList is a list of Image objects. +type ImageList struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of images + Items []Image `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient=true + +// Image is an immutable representation of a Docker image and metadata at a point in time. +type Image struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // DockerImageReference is the string that can be used to pull this image. + DockerImageReference string `json:"dockerImageReference,omitempty" protobuf:"bytes,2,opt,name=dockerImageReference"` + // DockerImageMetadata contains metadata about this image + DockerImageMetadata runtime.RawExtension `json:"dockerImageMetadata,omitempty" protobuf:"bytes,3,opt,name=dockerImageMetadata"` + // DockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" + DockerImageMetadataVersion string `json:"dockerImageMetadataVersion,omitempty" protobuf:"bytes,4,opt,name=dockerImageMetadataVersion"` + // DockerImageManifest is the raw JSON of the manifest + DockerImageManifest string `json:"dockerImageManifest,omitempty" protobuf:"bytes,5,opt,name=dockerImageManifest"` + // DockerImageLayers represents the layers in the image. May not be set if the image does not define that data. + DockerImageLayers []ImageLayer `json:"dockerImageLayers" protobuf:"bytes,6,rep,name=dockerImageLayers"` + // Signatures holds all signatures of the image. + Signatures []ImageSignature `json:"signatures,omitempty" protobuf:"bytes,7,rep,name=signatures"` + // DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. + DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty" protobuf:"bytes,8,rep,name=dockerImageSignatures"` + // DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. + DockerImageManifestMediaType string `json:"dockerImageManifestMediaType,omitempty" protobuf:"bytes,9,opt,name=dockerImageManifestMediaType"` + // DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. + DockerImageConfig string `json:"dockerImageConfig,omitempty" protobuf:"bytes,10,opt,name=dockerImageConfig"` +} + +// ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none. +type ImageLayer struct { + // Name of the layer as defined by the underlying store. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // Size of the layer in bytes as defined by the underlying store. + LayerSize int64 `json:"size" protobuf:"varint,2,opt,name=size"` + // MediaType of the referenced object. + MediaType string `json:"mediaType" protobuf:"bytes,3,opt,name=mediaType"` +} + +// ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims +// as long as the signature is trusted. Based on this information it is possible to restrict runnable images +// to those matching cluster-wide policy. +// There are two mandatory fields provided by client: Type and Content. They should be parsed by clients doing +// image verification. The others are parsed from signature's content by the server. They serve just an +// informative purpose. +type ImageSignature struct { + // Required: Describes a type of stored blob. + Type string `json:"type" protobuf:"bytes,1,opt,name=type"` + // Required: An opaque binary string which is an image's signature. + Content []byte `json:"content" protobuf:"bytes,2,opt,name=content"` + // Conditions represent the latest available observations of a signature's current state. + Conditions []SignatureCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,3,rep,name=conditions"` + + // Following metadata fields will be set by server if the signature content is successfully parsed and + // the information available. + + // A human readable string representing image's identity. It could be a product name and version, or an + // image pull spec (e.g. "registry.access.redhat.com/rhel7/rhel:7.2"). + ImageIdentity string `json:"imageIdentity,omitempty" protobuf:"bytes,4,opt,name=imageIdentity"` + // Contains claims from the signature. + SignedClaims map[string]string `json:"signedClaims,omitempty" protobuf:"bytes,5,rep,name=signedClaims"` + // If specified, it is the time of signature's creation. + Created *unversioned.Time `json:"created,omitempty" protobuf:"bytes,6,opt,name=created"` + // If specified, it holds information about an issuer of signing certificate or key (a person or entity + // who signed the signing certificate or key). + IssuedBy *SignatureIssuer `json:"issuedBy,omitempty" protobuf:"bytes,7,opt,name=issuedBy"` + // If specified, it holds information about a subject of signing certificate or key (a person or entity + // who signed the image). + IssuedTo *SignatureSubject `json:"issuedTo,omitempty" protobuf:"bytes,8,opt,name=issuedTo"` +} + +/// SignatureConditionType is a type of image signature condition. +type SignatureConditionType string + +// SignatureCondition describes an image signature condition of particular kind at particular probe time. +type SignatureCondition struct { + // Type of job condition, Complete or Failed. + Type SignatureConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=SignatureConditionType"` + // Status of the condition, one of True, False, Unknown. + Status kapi.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` + // Last time the condition was checked. + LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` + // Last time the condition transit from one status to another. + LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` + // (brief) reason for the condition's last transition. + Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` + // Human readable message indicating details about last transition. + Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` +} + +// SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject +// of signing certificate or key. +type SignatureGenericEntity struct { + // Organization name. + Organization string `json:"organization,omitempty" protobuf:"bytes,1,opt,name=organization"` + // Common name (e.g. openshift-signing-service). + CommonName string `json:"commonName,omitempty" protobuf:"bytes,2,opt,name=commonName"` +} + +// SignatureIssuer holds information about an issuer of signing certificate or key. +type SignatureIssuer struct { + SignatureGenericEntity `json:",inline" protobuf:"bytes,1,opt,name=signatureGenericEntity"` +} + +// SignatureSubject holds information about a person or entity who created the signature. +type SignatureSubject struct { + SignatureGenericEntity `json:",inline" protobuf:"bytes,1,opt,name=signatureGenericEntity"` + // If present, it is a human readable key id of public key belonging to the subject used to verify image + // signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g. + // 0x685ebe62bf278440). + PublicKeyID string `json:"publicKeyID" protobuf:"bytes,2,opt,name=publicKeyID"` +} + +// ImageStreamList is a list of ImageStream objects. +type ImageStreamList struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of imageStreams + Items []ImageStream `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// ImageStream stores a mapping of tags to images, metadata overrides that are applied +// when images are tagged in a stream, and an optional reference to a Docker image +// repository on a registry. +type ImageStream struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec describes the desired state of this stream + Spec ImageStreamSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + // Status describes the current state of this stream + Status ImageStreamStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// ImageStreamSpec represents options for ImageStreams. +type ImageStreamSpec struct { + // DockerImageRepository is optional, if specified this stream is backed by a Docker repository on this server + DockerImageRepository string `json:"dockerImageRepository,omitempty" protobuf:"bytes,1,opt,name=dockerImageRepository"` + // Tags map arbitrary string values to specific image locators + Tags []TagReference `json:"tags,omitempty" protobuf:"bytes,2,rep,name=tags"` +} + +// TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track. +type TagReference struct { + // Name of the tag + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // Annotations associated with images using this tag + Annotations map[string]string `json:"annotations" protobuf:"bytes,2,rep,name=annotations"` + // From is a reference to an image stream tag or image stream this tag should track + From *kapi.ObjectReference `json:"from,omitempty" protobuf:"bytes,3,opt,name=from"` + // Reference states if the tag will be imported. Default value is false, which means the tag will be imported. + Reference bool `json:"reference,omitempty" protobuf:"varint,4,opt,name=reference"` + // Generation is the image stream generation that updated this tag - setting it to 0 is an indication that the generation must be updated. + // Legacy clients will send this as nil, which means the client doesn't know or care. + Generation *int64 `json:"generation" protobuf:"varint,5,opt,name=generation"` + // Import is information that controls how images may be imported by the server. + ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,6,opt,name=importPolicy"` +} + +// TagImportPolicy describes the tag import policy +type TagImportPolicy struct { + // Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. + Insecure bool `json:"insecure,omitempty" protobuf:"varint,1,opt,name=insecure"` + // Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported + Scheduled bool `json:"scheduled,omitempty" protobuf:"varint,2,opt,name=scheduled"` +} + +// ImageStreamStatus contains information about the state of this image stream. +type ImageStreamStatus struct { + // DockerImageRepository represents the effective location this stream may be accessed at. + // May be empty until the server determines where the repository is located + DockerImageRepository string `json:"dockerImageRepository" protobuf:"bytes,1,opt,name=dockerImageRepository"` + // Tags are a historical record of images associated with each tag. The first entry in the + // TagEvent array is the currently tagged image. + Tags []NamedTagEventList `json:"tags,omitempty" protobuf:"bytes,2,rep,name=tags"` +} + +// NamedTagEventList relates a tag to its image history. +type NamedTagEventList struct { + // Tag is the tag for which the history is recorded + Tag string `json:"tag" protobuf:"bytes,1,opt,name=tag"` + // Standard object's metadata. + Items []TagEvent `json:"items" protobuf:"bytes,2,rep,name=items"` + // Conditions is an array of conditions that apply to the tag event list. + Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` +} + +// TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag. +type TagEvent struct { + // Created holds the time the TagEvent was created + Created unversioned.Time `json:"created" protobuf:"bytes,1,opt,name=created"` + // DockerImageReference is the string that can be used to pull this image + DockerImageReference string `json:"dockerImageReference" protobuf:"bytes,2,opt,name=dockerImageReference"` + // Image is the image + Image string `json:"image" protobuf:"bytes,3,opt,name=image"` + // Generation is the spec tag generation that resulted in this tag being updated + Generation int64 `json:"generation" protobuf:"varint,4,opt,name=generation"` +} + +type TagEventConditionType string + +// These are valid conditions of TagEvents. +const ( + // ImportSuccess with status False means the import of the specific tag failed + ImportSuccess TagEventConditionType = "ImportSuccess" +) + +// TagEventCondition contains condition information for a tag event. +type TagEventCondition struct { + // Type of tag event condition, currently only ImportSuccess + Type TagEventConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=TagEventConditionType"` + // Status of the condition, one of True, False, Unknown. + Status kapi.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` + // LastTransitionTIme is the time the condition transitioned from one status to another. + LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` + // Reason is a brief machine readable explanation for the condition's last transition. + Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` + // Message is a human readable description of the details about last transition, complementing reason. + Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` + // Generation is the spec tag generation that this status corresponds to + Generation int64 `json:"generation" protobuf:"varint,6,opt,name=generation"` +} + +// ImageStreamMapping represents a mapping from a single tag to a Docker image as +// well as the reference to the Docker image stream the image came from. +type ImageStreamMapping struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Image is a Docker image. + Image Image `json:"image" protobuf:"bytes,2,opt,name=image"` + // Tag is a string value this image can be located with inside the stream. + Tag string `json:"tag" protobuf:"bytes,3,opt,name=tag"` +} + +// ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream. +type ImageStreamTag struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Tag is the spec tag associated with this image stream tag, and it may be null + // if only pushes have occurred to this image stream. + Tag *TagReference `json:"tag" protobuf:"bytes,2,opt,name=tag"` + + // Generation is the current generation of the tagged image - if tag is provided + // and this value is not equal to the tag generation, a user has requested an + // import that has not completed, or Conditions will be filled out indicating any + // error. + Generation int64 `json:"generation" protobuf:"varint,3,opt,name=generation"` + + // Conditions is an array of conditions that apply to the image stream tag. + Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,4,rep,name=conditions"` + + // Image associated with the ImageStream and tag. + Image Image `json:"image" protobuf:"bytes,5,opt,name=image"` +} + +// ImageStreamTagList is a list of ImageStreamTag objects. +type ImageStreamTagList struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of image stream tags + Items []ImageStreamTag `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// ImageStreamImage represents an Image that is retrieved by image name from an ImageStream. +type ImageStreamImage struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Image associated with the ImageStream and image name. + Image Image `json:"image" protobuf:"bytes,2,opt,name=image"` +} + +// DockerImageReference points to a Docker image. +type DockerImageReference struct { + // Registry is the registry that contains the Docker image + Registry string `protobuf:"bytes,1,opt,name=registry"` + // Namespace is the namespace that contains the Docker image + Namespace string `protobuf:"bytes,2,opt,name=namespace"` + // Name is the name of the Docker image + Name string `protobuf:"bytes,3,opt,name=name"` + // Tag is which tag of the Docker image is being referenced + Tag string `protobuf:"bytes,4,opt,name=tag"` + // ID is the identifier for the Docker image + ID string `protobuf:"bytes,5,opt,name=iD"` +} + +// ImageStreamImport imports an image from remote repositories into OpenShift. +type ImageStreamImport struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec is a description of the images that the user wishes to import + Spec ImageStreamImportSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + // Status is the the result of importing the image + Status ImageStreamImportStatus `json:"status" protobuf:"bytes,3,opt,name=status"` +} + +// ImageStreamImportSpec defines what images should be imported. +type ImageStreamImportSpec struct { + // Import indicates whether to perform an import - if so, the specified tags are set on the spec + // and status of the image stream defined by the type meta. + Import bool `json:"import" protobuf:"varint,1,opt,name=import"` + // Repository is an optional import of an entire Docker image repository. A maximum limit on the + // number of tags imported this way is imposed by the server. + Repository *RepositoryImportSpec `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"` + // Images are a list of individual images to import. + Images []ImageImportSpec `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"` +} + +// ImageStreamImportStatus contains information about the status of an image stream import. +type ImageStreamImportStatus struct { + // Import is the image stream that was successfully updated or created when 'to' was set. + Import *ImageStream `json:"import,omitempty" protobuf:"bytes,1,opt,name=import"` + // Repository is set if spec.repository was set to the outcome of the import + Repository *RepositoryImportStatus `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"` + // Images is set with the result of importing spec.images + Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"` +} + +// RepositoryImportSpec describes a request to import images from a Docker image repository. +type RepositoryImportSpec struct { + // From is the source for the image repository to import; only kind DockerImage and a name of a Docker image repository is allowed + From kapi.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` + + // ImportPolicy is the policy controlling how the image is imported + ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,2,opt,name=importPolicy"` + // IncludeManifest determines if the manifest for each image is returned in the response + IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,3,opt,name=includeManifest"` +} + +// RepositoryImportStatus describes the result of an image repository import +type RepositoryImportStatus struct { + // Status reflects whether any failure occurred during import + Status unversioned.Status `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` + // Images is a list of images successfully retrieved by the import of the repository. + Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,2,rep,name=images"` + // AdditionalTags are tags that exist in the repository but were not imported because + // a maximum limit of automatic imports was applied. + AdditionalTags []string `json:"additionalTags,omitempty" protobuf:"bytes,3,rep,name=additionalTags"` +} + +// ImageImportSpec describes a request to import a specific image. +type ImageImportSpec struct { + // From is the source of an image to import; only kind DockerImage is allowed + From kapi.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` + // To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used + To *kapi.LocalObjectReference `json:"to,omitempty" protobuf:"bytes,2,opt,name=to"` + + // ImportPolicy is the policy controlling how the image is imported + ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,3,opt,name=importPolicy"` + // IncludeManifest determines if the manifest for each image is returned in the response + IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,4,opt,name=includeManifest"` +} + +// ImageImportStatus describes the result of an image import. +type ImageImportStatus struct { + // Status is the status of the image import, including errors encountered while retrieving the image + Status unversioned.Status `json:"status" protobuf:"bytes,1,opt,name=status"` + // Image is the metadata of that image, if the image was located + Image *Image `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` + // Tag is the tag this image was located under, if any + Tag string `json:"tag,omitempty" protobuf:"bytes,3,opt,name=tag"` +} From 04ce10ffea0d00a9a7b7d4337f8fcc0513c75ef2 Mon Sep 17 00:00:00 2001 From: Tomas Kral Date: Tue, 20 Sep 2016 14:28:53 +0200 Subject: [PATCH 2/2] Update tests - add ImageStreams --- .../entrypoint-command/output-os.json | 46 +- script/test/fixtures/etherpad/output-os.json | 220 ++++-- script/test/fixtures/gitlab/output-os.json | 372 ++++++---- .../fixtures/ngnix-node-redis/output-os.json | 672 ++++++++++++------ .../fixtures/ports-with-proto/output-os.json | 92 ++- 5 files changed, 974 insertions(+), 428 deletions(-) diff --git a/script/test/fixtures/entrypoint-command/output-os.json b/script/test/fixtures/entrypoint-command/output-os.json index df1122a1..a4f66049 100644 --- a/script/test/fixtures/entrypoint-command/output-os.json +++ b/script/test/fixtures/entrypoint-command/output-os.json @@ -17,7 +17,24 @@ "strategy": { "resources": {} }, - "triggers": null, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "base" + ], + "from": { + "kind": "ImageStreamTag", + "name": "base:latest" + } + } + } + ], "replicas": 1, "test": false, "selector": { @@ -34,7 +51,7 @@ "containers": [ { "name": "base", - "image": "busybox", + "image": " ", "command": [ "echo" ], @@ -49,6 +66,31 @@ } }, "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "base", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "busybox" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } } ] } diff --git a/script/test/fixtures/etherpad/output-os.json b/script/test/fixtures/etherpad/output-os.json index d6193f44..fcc86174 100644 --- a/script/test/fixtures/etherpad/output-os.json +++ b/script/test/fixtures/etherpad/output-os.json @@ -4,73 +4,31 @@ "metadata": {}, "items": [ { - "kind": "DeploymentConfig", + "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "etherpad", + "name": "mariadb", "creationTimestamp": null, "labels": { - "service": "etherpad" + "service": "mariadb" } }, "spec": { - "strategy": { - "resources": {} - }, - "triggers": null, - "replicas": 1, - "test": false, - "selector": { - "service": "etherpad" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "service": "etherpad" - } - }, - "spec": { - "containers": [ - { - "name": "etherpad", - "image": "centos/etherpad", - "ports": [ - { - "containerPort": 9001, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_USER", - "value": "etherpad" - }, - { - "name": "DB_DBID", - "value": "etherpad" - }, - { - "name": "DB_HOST", - "value": "mariadb" - }, - { - "name": "DB_PASS", - "value": "etherpad" - }, - { - "name": "DB_PORT", - "value": "3306" - } - ], - "resources": {} - } - ], - "restartPolicy": "Always" + "ports": [ + { + "name": "3306", + "protocol": "TCP", + "port": 3306, + "targetPort": 3306 } + ], + "selector": { + "service": "mariadb" } }, - "status": {} + "status": { + "loadBalancer": {} + } }, { "kind": "Service", @@ -113,7 +71,24 @@ "strategy": { "resources": {} }, - "triggers": null, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mariadb" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mariadb:latest" + } + } + } + ], "replicas": 1, "test": false, "selector": { @@ -130,7 +105,7 @@ "containers": [ { "name": "mariadb", - "image": "centos/mariadb", + "image": " ", "ports": [ { "containerPort": 3306, @@ -165,30 +140,139 @@ "status": {} }, { - "kind": "Service", + "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "mariadb", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "centos/mariadb" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "etherpad", "creationTimestamp": null, "labels": { - "service": "mariadb" + "service": "etherpad" } }, "spec": { - "ports": [ + "strategy": { + "resources": {} + }, + "triggers": [ { - "name": "3306", - "protocol": "TCP", - "port": 3306, - "targetPort": 3306 + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "etherpad" + ], + "from": { + "kind": "ImageStreamTag", + "name": "etherpad:latest" + } + } } ], + "replicas": 1, + "test": false, "selector": { - "service": "mariadb" + "service": "etherpad" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "service": "etherpad" + } + }, + "spec": { + "containers": [ + { + "name": "etherpad", + "image": " ", + "ports": [ + { + "containerPort": 9001, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "DB_USER", + "value": "etherpad" + }, + { + "name": "DB_DBID", + "value": "etherpad" + }, + { + "name": "DB_HOST", + "value": "mariadb" + }, + { + "name": "DB_PASS", + "value": "etherpad" + }, + { + "name": "DB_PORT", + "value": "3306" + } + ], + "resources": {} + } + ], + "restartPolicy": "Always" + } } }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "etherpad", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "centos/etherpad" + }, + "generation": null, + "importPolicy": {} + } + ] + }, "status": { - "loadBalancer": {} + "dockerImageRepository": "" } } ] diff --git a/script/test/fixtures/gitlab/output-os.json b/script/test/fixtures/gitlab/output-os.json index b170897e..99464ab2 100644 --- a/script/test/fixtures/gitlab/output-os.json +++ b/script/test/fixtures/gitlab/output-os.json @@ -3,95 +3,6 @@ "apiVersion": "v1", "metadata": {}, "items": [ - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "gitlab", - "creationTimestamp": null, - "labels": { - "service": "gitlab" - } - }, - "spec": { - "strategy": { - "resources": {} - }, - "triggers": null, - "replicas": 1, - "test": false, - "selector": { - "service": "gitlab" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "service": "gitlab" - } - }, - "spec": { - "containers": [ - { - "name": "gitlab", - "image": "swordphilic/gitlab", - "ports": [ - { - "containerPort": 80, - "protocol": "TCP" - }, - { - "containerPort": 443, - "protocol": "TCP" - }, - { - "containerPort": 22, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_HOST", - "value": "postgresql" - }, - { - "name": "DB_NAME", - "value": "gitlab" - }, - { - "name": "DB_PASS", - "value": "gitlab" - }, - { - "name": "DB_PORT", - "value": "5432" - }, - { - "name": "DB_TYPE", - "value": "postgres" - }, - { - "name": "DB_USER", - "value": "gitlab" - }, - { - "name": "REDIS_HOST", - "value": "redis" - }, - { - "name": "REDIS_PORT", - "value": "6379" - } - ], - "resources": {} - } - ], - "restartPolicy": "Always" - } - } - }, - "status": {} - }, { "kind": "Service", "apiVersion": "v1", @@ -131,6 +42,191 @@ "loadBalancer": {} } }, + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "postgresql", + "creationTimestamp": null, + "labels": { + "service": "postgresql" + } + }, + "spec": { + "ports": [ + { + "name": "5432", + "protocol": "TCP", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "service": "postgresql" + } + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "redis", + "creationTimestamp": null, + "labels": { + "service": "redis" + } + }, + "spec": { + "ports": [ + { + "name": "6379", + "protocol": "TCP", + "port": 6379, + "targetPort": 6379 + } + ], + "selector": { + "service": "redis" + } + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "gitlab", + "creationTimestamp": null, + "labels": { + "service": "gitlab" + } + }, + "spec": { + "strategy": { + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "gitlab" + ], + "from": { + "kind": "ImageStreamTag", + "name": "gitlab:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "service": "gitlab" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "service": "gitlab" + } + }, + "spec": { + "containers": [ + { + "name": "gitlab", + "image": " ", + "ports": [ + { + "containerPort": 80, + "protocol": "TCP" + }, + { + "containerPort": 443, + "protocol": "TCP" + }, + { + "containerPort": 22, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "DB_NAME", + "value": "gitlab" + }, + { + "name": "DB_PASS", + "value": "gitlab" + }, + { + "name": "DB_PORT", + "value": "5432" + }, + { + "name": "DB_TYPE", + "value": "postgres" + }, + { + "name": "DB_USER", + "value": "gitlab" + }, + { + "name": "REDIS_HOST", + "value": "redis" + }, + { + "name": "REDIS_PORT", + "value": "6379" + }, + { + "name": "DB_HOST", + "value": "postgresql" + } + ], + "resources": {} + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "gitlab", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "swordphilic/gitlab" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, { "kind": "DeploymentConfig", "apiVersion": "v1", @@ -145,7 +241,24 @@ "strategy": { "resources": {} }, - "triggers": null, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:latest" + } + } + } + ], "replicas": 1, "test": false, "selector": { @@ -162,7 +275,7 @@ "containers": [ { "name": "postgresql", - "image": "swordphilic/postgresql", + "image": " ", "ports": [ { "containerPort": 5432, @@ -193,30 +306,28 @@ "status": {} }, { - "kind": "Service", + "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "postgresql", - "creationTimestamp": null, - "labels": { - "service": "postgresql" - } + "creationTimestamp": null }, "spec": { - "ports": [ + "tags": [ { - "name": "5432", - "protocol": "TCP", - "port": 5432, - "targetPort": 5432 + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "swordphilic/postgresql" + }, + "generation": null, + "importPolicy": {} } - ], - "selector": { - "service": "postgresql" - } + ] }, "status": { - "loadBalancer": {} + "dockerImageRepository": "" } }, { @@ -233,7 +344,24 @@ "strategy": { "resources": {} }, - "triggers": null, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "redis" + ], + "from": { + "kind": "ImageStreamTag", + "name": "redis:latest" + } + } + } + ], "replicas": 1, "test": false, "selector": { @@ -250,7 +378,7 @@ "containers": [ { "name": "redis", - "image": "swordphilic/redis", + "image": " ", "ports": [ { "containerPort": 6379, @@ -267,30 +395,28 @@ "status": {} }, { - "kind": "Service", + "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "redis", - "creationTimestamp": null, - "labels": { - "service": "redis" - } + "creationTimestamp": null }, "spec": { - "ports": [ + "tags": [ { - "name": "6379", - "protocol": "TCP", - "port": 6379, - "targetPort": 6379 + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "swordphilic/redis" + }, + "generation": null, + "importPolicy": {} } - ], - "selector": { - "service": "redis" - } + ] }, "status": { - "loadBalancer": {} + "dockerImageRepository": "" } } ] diff --git a/script/test/fixtures/ngnix-node-redis/output-os.json b/script/test/fixtures/ngnix-node-redis/output-os.json index 9b892c58..0e93b3a6 100644 --- a/script/test/fixtures/ngnix-node-redis/output-os.json +++ b/script/test/fixtures/ngnix-node-redis/output-os.json @@ -3,52 +3,6 @@ "apiVersion": "v1", "metadata": {}, "items": [ - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "node2", - "creationTimestamp": null, - "labels": { - "service": "node2" - } - }, - "spec": { - "strategy": { - "resources": {} - }, - "triggers": null, - "replicas": 1, - "test": false, - "selector": { - "service": "node2" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "service": "node2" - } - }, - "spec": { - "containers": [ - { - "name": "node2", - "ports": [ - { - "containerPort": 8080, - "protocol": "TCP" - } - ], - "resources": {} - } - ], - "restartPolicy": "Always" - } - } - }, - "status": {} - }, { "kind": "Service", "apiVersion": "v1", @@ -76,52 +30,6 @@ "loadBalancer": {} } }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "node3", - "creationTimestamp": null, - "labels": { - "service": "node3" - } - }, - "spec": { - "strategy": { - "resources": {} - }, - "triggers": null, - "replicas": 1, - "test": false, - "selector": { - "service": "node3" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "service": "node3" - } - }, - "spec": { - "containers": [ - { - "name": "node3", - "ports": [ - { - "containerPort": 8080, - "protocol": "TCP" - } - ], - "resources": {} - } - ], - "restartPolicy": "Always" - } - } - }, - "status": {} - }, { "kind": "Service", "apiVersion": "v1", @@ -149,53 +57,6 @@ "loadBalancer": {} } }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "redis", - "creationTimestamp": null, - "labels": { - "service": "redis" - } - }, - "spec": { - "strategy": { - "resources": {} - }, - "triggers": null, - "replicas": 1, - "test": false, - "selector": { - "service": "redis" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "service": "redis" - } - }, - "spec": { - "containers": [ - { - "name": "redis", - "image": "redis", - "ports": [ - { - "containerPort": 6379, - "protocol": "TCP" - } - ], - "resources": {} - } - ], - "restartPolicy": "Always" - } - } - }, - "status": {} - }, { "kind": "Service", "apiVersion": "v1", @@ -223,52 +84,6 @@ "loadBalancer": {} } }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "nginx", - "creationTimestamp": null, - "labels": { - "service": "nginx" - } - }, - "spec": { - "strategy": { - "resources": {} - }, - "triggers": null, - "replicas": 1, - "test": false, - "selector": { - "service": "nginx" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "service": "nginx" - } - }, - "spec": { - "containers": [ - { - "name": "nginx", - "ports": [ - { - "containerPort": 80, - "protocol": "TCP" - } - ], - "resources": {} - } - ], - "restartPolicy": "Always" - } - } - }, - "status": {} - }, { "kind": "Service", "apiVersion": "v1", @@ -296,52 +111,6 @@ "loadBalancer": {} } }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "node1", - "creationTimestamp": null, - "labels": { - "service": "node1" - } - }, - "spec": { - "strategy": { - "resources": {} - }, - "triggers": null, - "replicas": 1, - "test": false, - "selector": { - "service": "node1" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "service": "node1" - } - }, - "spec": { - "containers": [ - { - "name": "node1", - "ports": [ - { - "containerPort": 8080, - "protocol": "TCP" - } - ], - "resources": {} - } - ], - "restartPolicy": "Always" - } - } - }, - "status": {} - }, { "kind": "Service", "apiVersion": "v1", @@ -368,6 +137,447 @@ "status": { "loadBalancer": {} } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "node2", + "creationTimestamp": null, + "labels": { + "service": "node2" + } + }, + "spec": { + "strategy": { + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "node2" + ], + "from": { + "kind": "ImageStreamTag", + "name": "node2:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "service": "node2" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "service": "node2" + } + }, + "spec": { + "containers": [ + { + "name": "node2", + "image": " ", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "resources": {} + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "node2", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "node3", + "creationTimestamp": null, + "labels": { + "service": "node3" + } + }, + "spec": { + "strategy": { + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "node3" + ], + "from": { + "kind": "ImageStreamTag", + "name": "node3:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "service": "node3" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "service": "node3" + } + }, + "spec": { + "containers": [ + { + "name": "node3", + "image": " ", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "resources": {} + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "node3", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "redis", + "creationTimestamp": null, + "labels": { + "service": "redis" + } + }, + "spec": { + "strategy": { + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "redis" + ], + "from": { + "kind": "ImageStreamTag", + "name": "redis:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "service": "redis" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "service": "redis" + } + }, + "spec": { + "containers": [ + { + "name": "redis", + "image": " ", + "ports": [ + { + "containerPort": 6379, + "protocol": "TCP" + } + ], + "resources": {} + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "redis", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "redis" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "nginx", + "creationTimestamp": null, + "labels": { + "service": "nginx" + } + }, + "spec": { + "strategy": { + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nginx" + ], + "from": { + "kind": "ImageStreamTag", + "name": "nginx:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "service": "nginx" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "service": "nginx" + } + }, + "spec": { + "containers": [ + { + "name": "nginx", + "image": " ", + "ports": [ + { + "containerPort": 80, + "protocol": "TCP" + } + ], + "resources": {} + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "nginx", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "node1", + "creationTimestamp": null, + "labels": { + "service": "node1" + } + }, + "spec": { + "strategy": { + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "node1" + ], + "from": { + "kind": "ImageStreamTag", + "name": "node1:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "service": "node1" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "service": "node1" + } + }, + "spec": { + "containers": [ + { + "name": "node1", + "image": " ", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "resources": {} + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "node1", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } } ] } diff --git a/script/test/fixtures/ports-with-proto/output-os.json b/script/test/fixtures/ports-with-proto/output-os.json index a5d78d3b..37b14fda 100644 --- a/script/test/fixtures/ports-with-proto/output-os.json +++ b/script/test/fixtures/ports-with-proto/output-os.json @@ -77,7 +77,24 @@ "strategy": { "resources": {} }, - "triggers": null, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "redis" + ], + "from": { + "kind": "ImageStreamTag", + "name": "redis:3.0" + } + } + } + ], "replicas": 1, "test": false, "selector": { @@ -94,7 +111,7 @@ "containers": [ { "name": "redis", - "image": "redis:3.0", + "image": " ", "ports": [ { "containerPort": 6379, @@ -114,6 +131,31 @@ }, "status": {} }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "redis", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "3.0", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "redis:3.0" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, { "kind": "DeploymentConfig", "apiVersion": "v1", @@ -128,7 +170,24 @@ "strategy": { "resources": {} }, - "triggers": null, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "web" + ], + "from": { + "kind": "ImageStreamTag", + "name": "web:latest" + } + } + } + ], "replicas": 1, "test": false, "selector": { @@ -145,7 +204,7 @@ "containers": [ { "name": "web", - "image": "tuna/docker-counter23", + "image": " ", "ports": [ { "containerPort": 5000, @@ -160,6 +219,31 @@ } }, "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "web", + "creationTimestamp": null + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "tuna/docker-counter23" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } } ] }