Golang DeepCopy_unversioned_TypeMeta示例

说明

golang deepcopy_unversioned_typemeta示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。

编程语言: Golang

命名空间/包名称: k8s/io/kubernetes/pkg/api/unversioned

示例#1
文件: deep_copy_generated.go 项目: 40a/bootkube

func DeepCopy_v1alpha1_KubeSchedulerConfiguration(in KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	out.Port = in.Port
	out.Address = in.Address
	out.AlgorithmProvider = in.AlgorithmProvider
	out.PolicyConfigFile = in.PolicyConfigFile
	if in.EnableProfiling != nil {
		in, out := in.EnableProfiling, &out.EnableProfiling
		*out = new(bool)
		**out = *in
	} else {
		out.EnableProfiling = nil
	}
	out.ContentType = in.ContentType
	out.KubeAPIQPS = in.KubeAPIQPS
	out.KubeAPIBurst = in.KubeAPIBurst
	out.SchedulerName = in.SchedulerName
	out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
	out.FailureDomains = in.FailureDomains
	if err := DeepCopy_v1alpha1_LeaderElectionConfiguration(in.LeaderElection, &out.LeaderElection, c); err != nil {
		return err
	}
	return nil
}

示例#2
文件: deep_copy_generated.go 项目: ZenoRewn/origin

func DeepCopy_api_Policy(in Policy, out *Policy, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := unversioned.DeepCopy_unversioned_Time(in.LastModified, &out.LastModified, c); err != nil {
		return err
	}
	if in.Roles != nil {
		in, out := in.Roles, &out.Roles
		*out = make(map[string]*Role)
		for key, val := range in {
			if newVal, err := c.DeepCopy(val); err != nil {
				return err
			} else {
				(*out)[key] = newVal.(*Role)
			}
		}
	} else {
		out.Roles = nil
	}
	return nil
}

示例#3
文件: deep_copy_generated.go 项目: ZenoRewn/origin

func DeepCopy_api_ResourceAccessReviewResponse(in ResourceAccessReviewResponse, out *ResourceAccessReviewResponse, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	out.Namespace = in.Namespace
	if in.Users != nil {
		in, out := in.Users, &out.Users
		*out = make(sets.String)
		for key, val := range in {
			newVal := new(sets.Empty)
			if err := sets.DeepCopy_sets_Empty(val, newVal, c); err != nil {
				return err
			}
			(*out)[key] = *newVal
		}
	} else {
		out.Users = nil
	}
	if in.Groups != nil {
		in, out := in.Groups, &out.Groups
		*out = make(sets.String)
		for key, val := range in {
			newVal := new(sets.Empty)
			if err := sets.DeepCopy_sets_Empty(val, newVal, c); err != nil {
				return err
			}
			(*out)[key] = *newVal
		}
	} else {
		out.Groups = nil
	}
	return nil
}

示例#4
文件: deep_copy_generated.go 项目: legionus/origin

func DeepCopy_v1_ClusterPolicyBinding(in ClusterPolicyBinding, out *ClusterPolicyBinding, 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 := unversioned.DeepCopy_unversioned_Time(in.LastModified, &out.LastModified, c); err != nil {
		return err
	}
	if err := api_v1.DeepCopy_v1_ObjectReference(in.PolicyRef, &out.PolicyRef, c); err != nil {
		return err
	}
	if in.RoleBindings != nil {
		in, out := in.RoleBindings, &out.RoleBindings
		*out = make([]NamedClusterRoleBinding, len(in))
		for i := range in {
			if err := DeepCopy_v1_NamedClusterRoleBinding(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.RoleBindings = nil
	}
	return nil
}

示例#5
文件: deep_copy_generated.go 项目: ZenoRewn/origin

func DeepCopy_api_ClusterPolicyBinding(in ClusterPolicyBinding, out *ClusterPolicyBinding, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := unversioned.DeepCopy_unversioned_Time(in.LastModified, &out.LastModified, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectReference(in.PolicyRef, &out.PolicyRef, c); err != nil {
		return err
	}
	if in.RoleBindings != nil {
		in, out := in.RoleBindings, &out.RoleBindings
		*out = make(map[string]*ClusterRoleBinding)
		for key, val := range in {
			if newVal, err := c.DeepCopy(val); err != nil {
				return err
			} else {
				(*out)[key] = newVal.(*ClusterRoleBinding)
			}
		}
	} else {
		out.RoleBindings = nil
	}
	return nil
}

示例#6
文件: deep_copy_generated.go 项目: ZenoRewn/origin

func DeepCopy_api_SubjectAccessReview(in SubjectAccessReview, out *SubjectAccessReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_api_AuthorizationAttributes(in.Action, &out.Action, c); err != nil {
		return err
	}
	out.User = in.User
	if in.Groups != nil {
		in, out := in.Groups, &out.Groups
		*out = make(sets.String)
		for key, val := range in {
			newVal := new(sets.Empty)
			if err := sets.DeepCopy_sets_Empty(val, newVal, c); err != nil {
				return err
			}
			(*out)[key] = *newVal
		}
	} else {
		out.Groups = nil
	}
	if in.Scopes != nil {
		in, out := in.Scopes, &out.Scopes
		*out = make([]string, len(in))
		copy(*out, in)
	} else {
		out.Scopes = nil
	}
	return nil
}

示例#7
文件: deep_copy_generated.go 项目: sgallagher/origin

func DeepCopy_api_DockerImage(in DockerImage, out *DockerImage, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	out.ID = in.ID
	out.Parent = in.Parent
	out.Comment = in.Comment
	if err := unversioned.DeepCopy_unversioned_Time(in.Created, &out.Created, c); err != nil {
		return err
	}
	out.Container = in.Container
	if err := DeepCopy_api_DockerConfig(in.ContainerConfig, &out.ContainerConfig, c); err != nil {
		return err
	}
	out.DockerVersion = in.DockerVersion
	out.Author = in.Author
	if in.Config != nil {
		in, out := in.Config, &out.Config
		*out = new(DockerConfig)
		if err := DeepCopy_api_DockerConfig(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Config = nil
	}
	out.Architecture = in.Architecture
	out.Size = in.Size
	return nil
}

示例#8
文件: deep_copy_generated.go 项目: Xmagicer/origin

func DeepCopy_api_ResourceAccessReviewResponse(in ResourceAccessReviewResponse, out *ResourceAccessReviewResponse, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	out.Namespace = in.Namespace
	if in.Users != nil {
		in, out := in.Users, &out.Users
		*out = make(sets.String)
		for key, val := range in {
			if newVal, err := c.DeepCopy(val); err != nil {
				return err
			} else {
				(*out)[key] = newVal.(sets.Empty)
			}
		}
	} else {
		out.Users = nil
	}
	if in.Groups != nil {
		in, out := in.Groups, &out.Groups
		*out = make(sets.String)
		for key, val := range in {
			if newVal, err := c.DeepCopy(val); err != nil {
				return err
			} else {
				(*out)[key] = newVal.(sets.Empty)
			}
		}
	} else {
		out.Groups = nil
	}
	out.EvaluationError = in.EvaluationError
	return nil
}

示例#9
文件: deep_copy_generated.go 项目: Xmagicer/origin

func DeepCopy_api_LocalSubjectAccessReview(in LocalSubjectAccessReview, out *LocalSubjectAccessReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_api_Action(in.Action, &out.Action, c); err != nil {
		return err
	}
	out.User = in.User
	if in.Groups != nil {
		in, out := in.Groups, &out.Groups
		*out = make(sets.String)
		for key, val := range in {
			if newVal, err := c.DeepCopy(val); err != nil {
				return err
			} else {
				(*out)[key] = newVal.(sets.Empty)
			}
		}
	} else {
		out.Groups = nil
	}
	if in.Scopes != nil {
		in, out := in.Scopes, &out.Scopes
		*out = make([]string, len(in))
		copy(*out, in)
	} else {
		out.Scopes = nil
	}
	return nil
}

示例#10
文件: deep_copy_generated.go 项目: RomainVabre/origin

func DeepCopy_api_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.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	out.DockerImageReference = in.DockerImageReference
	if err := DeepCopy_api_DockerImage(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_api_ImageLayer(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.DockerImageLayers = nil
	}
	return nil
}

示例#11
文件: deep_copy_generated.go 项目: sgallagher/origin

func DeepCopy_api_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.DeepCopy_api_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_api_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_api_TagEventCondition(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Conditions = nil
	}
	if err := DeepCopy_api_Image(in.Image, &out.Image, c); err != nil {
		return err
	}
	return nil
}

示例#12
文件: deep_copy_generated.go 项目: Cloven/minikube

func DeepCopy_v1beta1_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	out.Export = in.Export
	out.Exact = in.Exact
	return nil
}

示例#13
文件: deep_copy_generated.go 项目: Xmagicer/origin

func DeepCopy_api_LocalResourceAccessReview(in LocalResourceAccessReview, out *LocalResourceAccessReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_api_Action(in.Action, &out.Action, c); err != nil {
		return err
	}
	return nil
}

示例#14
文件: deep_copy_generated.go 项目: sgallagher/origin

func DeepCopy_v1_DeploymentConfigRollback(in DeploymentConfigRollback, out *DeploymentConfigRollback, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v1_DeploymentConfigRollbackSpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	return nil
}

示例#15
文件: deep_copy_generated.go 项目: ZenoRewn/origin

func DeepCopy_api_ResourceAccessReview(in ResourceAccessReview, out *ResourceAccessReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_api_AuthorizationAttributes(in.Action, &out.Action, c); err != nil {
		return err
	}
	return nil
}

示例#16
文件: deep_copy_generated.go 项目: ZenoRewn/origin

func DeepCopy_api_SubjectAccessReviewResponse(in SubjectAccessReviewResponse, out *SubjectAccessReviewResponse, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	out.Namespace = in.Namespace
	out.Allowed = in.Allowed
	out.Reason = in.Reason
	return nil
}

示例#17
文件: deep_copy_generated.go 项目: RomainVabre/origin

func DeepCopy_api_SelfSubjectRulesReview(in SelfSubjectRulesReview, out *SelfSubjectRulesReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_api_SubjectRulesReviewStatus(in.Status, &out.Status, c); err != nil {
		return err
	}
	return nil
}

示例#18
文件: deep_copy_generated.go 项目: RomainVabre/origin

func DeepCopy_v1_ProjectRequest(in ProjectRequest, out *ProjectRequest, 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.DisplayName = in.DisplayName
	out.Description = in.Description
	return nil
}

示例#19
文件: deep_copy_generated.go 项目: Xmagicer/origin

func DeepCopy_v1_NetNamespace(in NetNamespace, out *NetNamespace, 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.NetName = in.NetName
	out.NetID = in.NetID
	return nil
}

示例#20
文件: deep_copy_generated.go 项目: 40a/bootkube

func DeepCopy_authorization_SelfSubjectAccessReview(in SelfSubjectAccessReview, out *SelfSubjectAccessReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_authorization_SelfSubjectAccessReviewSpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	if err := DeepCopy_authorization_SubjectAccessReviewStatus(in.Status, &out.Status, c); err != nil {
		return err
	}
	return nil
}

示例#21
文件: deep_copy_generated.go 项目: sgallagher/origin

func DeepCopy_api_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.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_api_Image(in.Image, &out.Image, c); err != nil {
		return err
	}
	return nil
}

示例#22
文件: deep_copy_generated.go 项目: 40a/bootkube

func DeepCopy_extensions_NetworkPolicy(in NetworkPolicy, out *NetworkPolicy, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_extensions_NetworkPolicySpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	return nil
}

示例#23
文件: deep_copy_generated.go 项目: Cloven/minikube

func DeepCopy_v2alpha1_JobTemplate(in JobTemplate, out *JobTemplate, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v2alpha1_JobTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	return nil
}

示例#24
文件: deep_copy_generated.go 项目: Cloven/minikube

func DeepCopy_v1beta1_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v1beta1_PodSecurityPolicySpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	return nil
}

示例#25
文件: deep_copy_generated.go 项目: abhgupta/origin

func DeepCopy_v1_EgressNetworkPolicy(in EgressNetworkPolicy, out *EgressNetworkPolicy, 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_EgressNetworkPolicySpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	return nil
}

示例#26
文件: deep_copy_generated.go 项目: Xmagicer/origin

func DeepCopy_v1_HostSubnet(in HostSubnet, out *HostSubnet, 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.Host = in.Host
	out.HostIP = in.HostIP
	out.Subnet = in.Subnet
	return nil
}

示例#27
文件: deep_copy_generated.go 项目: Xmagicer/origin

func DeepCopy_api_PodSecurityPolicySubjectReview(in PodSecurityPolicySubjectReview, out *PodSecurityPolicySubjectReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_api_PodSecurityPolicySubjectReviewSpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	if err := DeepCopy_api_PodSecurityPolicySubjectReviewStatus(in.Status, &out.Status, c); err != nil {
		return err
	}
	return nil
}

示例#28
文件: deep_copy_generated.go 项目: FlyWings/kubernetes

func DeepCopy_v1beta1_TokenReview(in TokenReview, out *TokenReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v1beta1_TokenReviewSpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	if err := DeepCopy_v1beta1_TokenReviewStatus(in.Status, &out.Status, c); err != nil {
		return err
	}
	return nil
}

示例#29
文件: deep_copy_generated.go 项目: RomainVabre/origin

func DeepCopy_v1_ClusterNetwork(in ClusterNetwork, out *ClusterNetwork, 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.Network = in.Network
	out.HostSubnetLength = in.HostSubnetLength
	out.ServiceNetwork = in.ServiceNetwork
	return nil
}

示例#30
文件: deep_copy_generated.go 项目: XbinZh/kubernetes

func DeepCopy_v1beta1_LocalSubjectAccessReview(in LocalSubjectAccessReview, out *LocalSubjectAccessReview, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	if err := DeepCopy_v1beta1_SubjectAccessReviewStatus(in.Status, &out.Status, c); err != nil {
		return err
	}
	return nil
}

展开阅读全文