• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang v1.DeepCopy_v1_ObjectMeta函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中k8s/io/kubernetes/pkg/api/v1.DeepCopy_v1_ObjectMeta函数的典型用法代码示例。如果您正苦于以下问题:Golang DeepCopy_v1_ObjectMeta函数的具体用法?Golang DeepCopy_v1_ObjectMeta怎么用?Golang DeepCopy_v1_ObjectMeta使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了DeepCopy_v1_ObjectMeta函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: DeepCopy_v1_ImageStreamTag

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
}
开发者ID:ZenoRewn,项目名称:origin,代码行数:33,代码来源:deep_copy_generated.go


示例2: DeepCopy_v1_RoleBinding

func DeepCopy_v1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*RoleBinding)
		out := out.(*RoleBinding)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if in.UserNames != nil {
			in, out := &in.UserNames, &out.UserNames
			*out = make(OptionalNames, len(*in))
			copy(*out, *in)
		} else {
			out.UserNames = nil
		}
		if in.GroupNames != nil {
			in, out := &in.GroupNames, &out.GroupNames
			*out = make(OptionalNames, len(*in))
			copy(*out, *in)
		} else {
			out.GroupNames = nil
		}
		if in.Subjects != nil {
			in, out := &in.Subjects, &out.Subjects
			*out = make([]api_v1.ObjectReference, len(*in))
			for i := range *in {
				(*out)[i] = (*in)[i]
			}
		} else {
			out.Subjects = nil
		}
		out.RoleRef = in.RoleRef
		return nil
	}
}
开发者ID:php-coder,项目名称:origin,代码行数:35,代码来源:zz_generated.deepcopy.go


示例3: DeepCopy_v1_ImageStreamTag

func DeepCopy_v1_ImageStreamTag(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ImageStreamTag)
		out := out.(*ImageStreamTag)
		out.TypeMeta = in.TypeMeta
		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
	}
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:35,代码来源:zz_generated.deepcopy.go


示例4: DeepCopy_v1_Image

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
	}
	return nil
}
开发者ID:RomainVabre,项目名称:origin,代码行数:26,代码来源:deep_copy_generated.go


示例5: 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


示例6: DeepCopy_v1_User

func DeepCopy_v1_User(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*User)
		out := out.(*User)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.FullName = in.FullName
		if in.Identities != nil {
			in, out := &in.Identities, &out.Identities
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.Identities = nil
		}
		if in.Groups != nil {
			in, out := &in.Groups, &out.Groups
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.Groups = nil
		}
		return nil
	}
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:26,代码来源:zz_generated.deepcopy.go


示例7: DeepCopy_v1_OAuthAccessToken

func DeepCopy_v1_OAuthAccessToken(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*OAuthAccessToken)
		out := out.(*OAuthAccessToken)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.ClientName = in.ClientName
		out.ExpiresIn = in.ExpiresIn
		if in.Scopes != nil {
			in, out := &in.Scopes, &out.Scopes
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.Scopes = nil
		}
		out.RedirectURI = in.RedirectURI
		out.UserName = in.UserName
		out.UserUID = in.UserUID
		out.AuthorizeToken = in.AuthorizeToken
		out.RefreshToken = in.RefreshToken
		return nil
	}
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:25,代码来源:zz_generated.deepcopy.go


示例8: DeepCopy_v2alpha1_JobTemplateSpec

func DeepCopy_v2alpha1_JobTemplateSpec(in JobTemplateSpec, out *JobTemplateSpec, c *conversion.Cloner) error {
	if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v2alpha1_JobSpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	return nil
}
开发者ID:Cloven,项目名称:minikube,代码行数:9,代码来源:deep_copy_generated.go


示例9: DeepCopy_v1_Scale

func DeepCopy_v1_Scale(in Scale, out *Scale, c *conversion.Cloner) error {
	out.TypeMeta = in.TypeMeta
	if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	out.Spec = in.Spec
	out.Status = in.Status
	return nil
}
开发者ID:apcera,项目名称:kubernetes,代码行数:9,代码来源:deep_copy_generated.go


示例10: DeepCopy_v1beta1_PodSecurityPolicy

func DeepCopy_v1beta1_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error {
	out.TypeMeta = in.TypeMeta
	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
}
开发者ID:apcera,项目名称:kubernetes,代码行数:10,代码来源:deep_copy_generated.go


示例11: DeepCopy_v1beta1_ReplicaSet

func DeepCopy_v1beta1_ReplicaSet(in ReplicaSet, out *ReplicaSet, c *conversion.Cloner) error {
	out.TypeMeta = in.TypeMeta
	if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v1beta1_ReplicaSetSpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	out.Status = in.Status
	return nil
}
开发者ID:apcera,项目名称:kubernetes,代码行数:11,代码来源:deep_copy_generated.go


示例12: DeepCopy_v1_NetNamespace

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
}
开发者ID:Xmagicer,项目名称:origin,代码行数:11,代码来源:deep_copy_generated.go


示例13: DeepCopy_v1_ProjectRequest

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
}
开发者ID:RomainVabre,项目名称:origin,代码行数:11,代码来源:deep_copy_generated.go


示例14: DeepCopy_v1alpha1_PodDisruptionBudget

func DeepCopy_v1alpha1_PodDisruptionBudget(in PodDisruptionBudget, out *PodDisruptionBudget, c *conversion.Cloner) error {
	out.TypeMeta = in.TypeMeta
	if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v1alpha1_PodDisruptionBudgetSpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	out.Status = in.Status
	return nil
}
开发者ID:apcera,项目名称:kubernetes,代码行数:11,代码来源:deep_copy_generated.go


示例15: DeepCopy_v1_HostSubnet

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
}
开发者ID:Xmagicer,项目名称:origin,代码行数:12,代码来源:deep_copy_generated.go


示例16: DeepCopy_v1_ClusterNetwork

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
}
开发者ID:RomainVabre,项目名称:origin,代码行数:12,代码来源:deep_copy_generated.go


示例17: DeepCopy_v1_OAuthRedirectReference

func DeepCopy_v1_OAuthRedirectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*OAuthRedirectReference)
		out := out.(*OAuthRedirectReference)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.Reference = in.Reference
		return nil
	}
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:12,代码来源:zz_generated.deepcopy.go


示例18: DeepCopy_v1_ImageStreamImage

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
}
开发者ID:ZenoRewn,项目名称:origin,代码行数:12,代码来源:deep_copy_generated.go


示例19: DeepCopy_v2alpha1_JobTemplate

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
}
开发者ID:Cloven,项目名称:minikube,代码行数:12,代码来源:deep_copy_generated.go


示例20: DeepCopy_v1beta1_NetworkPolicy

func DeepCopy_v1beta1_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 := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := DeepCopy_v1beta1_NetworkPolicySpec(in.Spec, &out.Spec, c); err != nil {
		return err
	}
	return nil
}
开发者ID:Cloven,项目名称:minikube,代码行数:12,代码来源:deep_copy_generated.go



注:本文中的k8s/io/kubernetes/pkg/api/v1.DeepCopy_v1_ObjectMeta函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang v1.DeepCopy_v1_ObjectReference函数代码示例发布时间:2022-05-28
下一篇:
Golang v1.DeepCopy_v1_LocalObjectReference函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap