當前位置: 首頁>>代碼示例>>Golang>>正文


Golang unversioned.DeepCopy_unversioned_TypeMeta函數代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/api/unversioned.DeepCopy_unversioned_TypeMeta函數的典型用法代碼示例。如果您正苦於以下問題:Golang DeepCopy_unversioned_TypeMeta函數的具體用法?Golang DeepCopy_unversioned_TypeMeta怎麽用?Golang DeepCopy_unversioned_TypeMeta使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DeepCopy_unversioned_TypeMeta函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: DeepCopy_v1alpha1_KubeSchedulerConfiguration

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
}
開發者ID:40a,項目名稱:bootkube,代碼行數:26,代碼來源:deep_copy_generated.go

示例2: DeepCopy_api_Policy

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
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:25,代碼來源:deep_copy_generated.go

示例3: DeepCopy_api_ResourceAccessReviewResponse

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
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:33,代碼來源:deep_copy_generated.go

示例4: DeepCopy_v1_ClusterPolicyBinding

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
}
開發者ID:legionus,項目名稱:origin,代碼行數:26,代碼來源:deep_copy_generated.go

示例5: DeepCopy_api_ClusterPolicyBinding

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
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:28,代碼來源:deep_copy_generated.go

示例6: DeepCopy_api_SubjectAccessReview

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
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:30,代碼來源:deep_copy_generated.go

示例7: DeepCopy_api_DockerImage

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
}
開發者ID:sgallagher,項目名稱:origin,代碼行數:29,代碼來源:deep_copy_generated.go

示例8: DeepCopy_api_ResourceAccessReviewResponse

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
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:34,代碼來源:deep_copy_generated.go

示例9: DeepCopy_api_LocalSubjectAccessReview

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
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:30,代碼來源:deep_copy_generated.go

示例10: DeepCopy_api_Image

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
}
開發者ID:RomainVabre,項目名稱:origin,代碼行數:26,代碼來源:deep_copy_generated.go

示例11: DeepCopy_api_ImageStreamTag

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
}
開發者ID:sgallagher,項目名稱:origin,代碼行數:33,代碼來源:deep_copy_generated.go

示例12: DeepCopy_v1beta1_ExportOptions

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
}
開發者ID:Cloven,項目名稱:minikube,代碼行數:8,代碼來源:deep_copy_generated.go

示例13: DeepCopy_api_LocalResourceAccessReview

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
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:9,代碼來源:deep_copy_generated.go

示例14: DeepCopy_v1_DeploymentConfigRollback

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
}
開發者ID:sgallagher,項目名稱:origin,代碼行數:9,代碼來源:deep_copy_generated.go

示例15: DeepCopy_api_ResourceAccessReview

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
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:9,代碼來源:deep_copy_generated.go


注:本文中的k8s/io/kubernetes/pkg/api/unversioned.DeepCopy_unversioned_TypeMeta函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。