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

Golang v1.Convert_v1_ObjectMeta_To_api_ObjectMeta函数代码示例

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

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



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

示例1: autoConvert_v1_ImageStreamTag_To_api_ImageStreamTag

func autoConvert_v1_ImageStreamTag_To_api_ImageStreamTag(in *ImageStreamTag, out *api.ImageStreamTag, s conversion.Scope) error {
	if err := pkg_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(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([]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
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:33,代码来源:zz_generated.conversion.go


示例2: autoConvert_v1_Image_To_api_Image

func autoConvert_v1_Image_To_api_Image(in *Image, out *api.Image, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.DockerImageReference = in.DockerImageReference
	// TODO: Inefficient conversion - can we improve it?
	if err := s.Convert(&in.DockerImageMetadata, &out.DockerImageMetadata, 0); err != nil {
		return err
	}
	out.DockerImageMetadataVersion = in.DockerImageMetadataVersion
	out.DockerImageManifest = in.DockerImageManifest
	out.DockerImageLayers = *(*[]api.ImageLayer)(unsafe.Pointer(&in.DockerImageLayers))
	if in.Signatures != nil {
		in, out := &in.Signatures, &out.Signatures
		*out = make([]api.ImageSignature, len(*in))
		for i := range *in {
			if err := Convert_v1_ImageSignature_To_api_ImageSignature(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Signatures = nil
	}
	out.DockerImageSignatures = *(*[][]byte)(unsafe.Pointer(&in.DockerImageSignatures))
	out.DockerImageManifestMediaType = in.DockerImageManifestMediaType
	out.DockerImageConfig = in.DockerImageConfig
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:28,代码来源:zz_generated.conversion.go


示例3: autoConvert_v1_Template_To_api_Template

func autoConvert_v1_Template_To_api_Template(in *Template, out *template_api.Template, 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
	}
	out.Message = in.Message
	if in.Objects != nil {
		in, out := &in.Objects, &out.Objects
		*out = make([]runtime.Object, len(*in))
		for i := range *in {
			if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Objects = nil
	}
	if in.Parameters != nil {
		in, out := &in.Parameters, &out.Parameters
		*out = make([]template_api.Parameter, len(*in))
		for i := range *in {
			if err := Convert_v1_Parameter_To_api_Parameter(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Parameters = nil
	}
	out.ObjectLabels = in.ObjectLabels
	return nil
}
开发者ID:Xmagicer,项目名称:origin,代码行数:33,代码来源:conversion_generated.go


示例4: autoConvert_v1_NetNamespace_To_api_NetNamespace

func autoConvert_v1_NetNamespace_To_api_NetNamespace(in *NetNamespace, out *api.NetNamespace, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.NetName = in.NetName
	out.NetID = in.NetID
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:zz_generated.conversion.go


示例5: autoConvert_v1_ProjectRequest_To_api_ProjectRequest

func autoConvert_v1_ProjectRequest_To_api_ProjectRequest(in *ProjectRequest, out *api.ProjectRequest, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.DisplayName = in.DisplayName
	out.Description = in.Description
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:zz_generated.conversion.go


示例6: autoConvert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy

func autoConvert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy(in *EgressNetworkPolicy, out *api.EgressNetworkPolicy, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:9,代码来源:zz_generated.conversion.go


示例7: autoConvert_v1_RoleBindingRestriction_To_api_RoleBindingRestriction

func autoConvert_v1_RoleBindingRestriction_To_api_RoleBindingRestriction(in *RoleBindingRestriction, out *api.RoleBindingRestriction, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_RoleBindingRestrictionSpec_To_api_RoleBindingRestrictionSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:9,代码来源:zz_generated.conversion.go


示例8: autoConvert_v1_HostSubnet_To_api_HostSubnet

func autoConvert_v1_HostSubnet_To_api_HostSubnet(in *HostSubnet, out *api.HostSubnet, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.Host = in.Host
	out.HostIP = in.HostIP
	out.Subnet = in.Subnet
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:9,代码来源:zz_generated.conversion.go


示例9: autoConvert_v1_OAuthRedirectReference_To_api_OAuthRedirectReference

func autoConvert_v1_OAuthRedirectReference_To_api_OAuthRedirectReference(in *OAuthRedirectReference, out *api.OAuthRedirectReference, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_RedirectReference_To_api_RedirectReference(&in.Reference, &out.Reference, s); err != nil {
		return err
	}
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:9,代码来源:zz_generated.conversion.go


示例10: autoConvert_v1_ImageStreamImage_To_api_ImageStreamImage

func autoConvert_v1_ImageStreamImage_To_api_ImageStreamImage(in *ImageStreamImage, out *api.ImageStreamImage, s conversion.Scope) error {
	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
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:9,代码来源:zz_generated.conversion.go


示例11: autoConvert_v1_OAuthClientAuthorization_To_api_OAuthClientAuthorization

func autoConvert_v1_OAuthClientAuthorization_To_api_OAuthClientAuthorization(in *OAuthClientAuthorization, out *api.OAuthClientAuthorization, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.ClientName = in.ClientName
	out.UserName = in.UserName
	out.UserUID = in.UserUID
	out.Scopes = *(*[]string)(unsafe.Pointer(&in.Scopes))
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:10,代码来源:zz_generated.conversion.go


示例12: autoConvert_v1_Policy_To_api_Policy

func autoConvert_v1_Policy_To_api_Policy(in *Policy, out *api.Policy, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.LastModified = in.LastModified
	if err := Convert_v1_NamedRoles_To_api_RolesByName(&in.Roles, &out.Roles, s); err != nil {
		return err
	}
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:10,代码来源:zz_generated.conversion.go


示例13: autoConvert_v1_ClusterNetwork_To_api_ClusterNetwork

func autoConvert_v1_ClusterNetwork_To_api_ClusterNetwork(in *ClusterNetwork, out *api.ClusterNetwork, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.Network = in.Network
	out.HostSubnetLength = in.HostSubnetLength
	out.ServiceNetwork = in.ServiceNetwork
	out.PluginName = in.PluginName
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:10,代码来源:zz_generated.conversion.go


示例14: autoConvert_v1_Group_To_api_Group

func autoConvert_v1_Group_To_api_Group(in *Group, out *user_api.Group, 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
	}
	out.Users = in.Users
	return nil
}
开发者ID:legionus,项目名称:origin,代码行数:10,代码来源:conversion_generated.go


示例15: autoConvert_v1_AppliedClusterResourceQuota_To_api_AppliedClusterResourceQuota

func autoConvert_v1_AppliedClusterResourceQuota_To_api_AppliedClusterResourceQuota(in *AppliedClusterResourceQuota, out *api.AppliedClusterResourceQuota, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_ClusterResourceQuotaSpec_To_api_ClusterResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_v1_ClusterResourceQuotaStatus_To_api_ClusterResourceQuotaStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:12,代码来源:zz_generated.conversion.go


示例16: autoConvert_v1_Route_To_api_Route

func autoConvert_v1_Route_To_api_Route(in *Route, out *api.Route, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_RouteSpec_To_api_RouteSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_v1_RouteStatus_To_api_RouteStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:12,代码来源:zz_generated.conversion.go


示例17: autoConvert_v1_Project_To_api_Project

func autoConvert_v1_Project_To_api_Project(in *Project, out *api.Project, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_ProjectSpec_To_api_ProjectSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_v1_ProjectStatus_To_api_ProjectStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:12,代码来源:zz_generated.conversion.go


示例18: autoConvert_v1_User_To_api_User

func autoConvert_v1_User_To_api_User(in *User, out *api.User, s conversion.Scope) error {
	if err := pkg_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
	}
	out.FullName = in.FullName
	out.Identities = in.Identities
	out.Groups = in.Groups
	return nil
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:12,代码来源:zz_generated.conversion.go


示例19: autoConvert_v1_OAuthClient_To_api_OAuthClient

func autoConvert_v1_OAuthClient_To_api_OAuthClient(in *OAuthClient, out *api.OAuthClient, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.Secret = in.Secret
	out.AdditionalSecrets = *(*[]string)(unsafe.Pointer(&in.AdditionalSecrets))
	out.RespondWithChallenges = in.RespondWithChallenges
	out.RedirectURIs = *(*[]string)(unsafe.Pointer(&in.RedirectURIs))
	out.GrantMethod = api.GrantHandlerType(in.GrantMethod)
	out.ScopeRestrictions = *(*[]api.ScopeRestriction)(unsafe.Pointer(&in.ScopeRestrictions))
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:12,代码来源:zz_generated.conversion.go


示例20: autoConvert_v1_ImageStreamImport_To_api_ImageStreamImport

func autoConvert_v1_ImageStreamImport_To_api_ImageStreamImport(in *ImageStreamImport, out *api.ImageStreamImport, s conversion.Scope) error {
	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
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:12,代码来源:zz_generated.conversion.go



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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