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

Golang v1.Convert_api_ObjectMeta_To_v1_ObjectMeta函数代码示例

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

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



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

示例1: autoConvert_api_Image_To_v1_Image

func autoConvert_api_Image_To_v1_Image(in *api.Image, out *Image, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_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 = *(*[]ImageLayer)(unsafe.Pointer(&in.DockerImageLayers))
	if in.Signatures != nil {
		in, out := &in.Signatures, &out.Signatures
		*out = make([]ImageSignature, len(*in))
		for i := range *in {
			if err := Convert_api_ImageSignature_To_v1_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


示例2: autoConvert_api_ImageStreamTag_To_v1_ImageStreamTag

func autoConvert_api_ImageStreamTag_To_v1_ImageStreamTag(in *api.ImageStreamTag, out *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_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
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:33,代码来源:zz_generated.conversion.go


示例3: autoConvert_api_Template_To_v1_Template

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


示例4: autoConvert_api_ProjectRequest_To_v1_ProjectRequest

func autoConvert_api_ProjectRequest_To_v1_ProjectRequest(in *api.ProjectRequest, out *ProjectRequest, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_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


示例5: autoConvert_api_NetNamespace_To_v1_NetNamespace

func autoConvert_api_NetNamespace_To_v1_NetNamespace(in *api.NetNamespace, out *NetNamespace, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_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


示例6: autoConvert_api_OAuthRedirectReference_To_v1_OAuthRedirectReference

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


示例7: autoConvert_api_ImageStreamImage_To_v1_ImageStreamImage

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


示例8: autoConvert_api_EgressNetworkPolicy_To_v1_EgressNetworkPolicy

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


示例9: autoConvert_api_HostSubnet_To_v1_HostSubnet

func autoConvert_api_HostSubnet_To_v1_HostSubnet(in *api.HostSubnet, out *HostSubnet, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_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


示例10: autoConvert_api_RoleBindingRestriction_To_v1_RoleBindingRestriction

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


示例11: autoConvert_api_OAuthClientAuthorization_To_v1_OAuthClientAuthorization

func autoConvert_api_OAuthClientAuthorization_To_v1_OAuthClientAuthorization(in *api.OAuthClientAuthorization, out *OAuthClientAuthorization, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_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_api_ClusterNetwork_To_v1_ClusterNetwork

func autoConvert_api_ClusterNetwork_To_v1_ClusterNetwork(in *api.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_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


示例13: autoConvert_api_Group_To_v1_Group

func autoConvert_api_Group_To_v1_Group(in *user_api.Group, out *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_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.Users = in.Users
	return nil
}
开发者ID:legionus,项目名称:origin,代码行数:10,代码来源:conversion_generated.go


示例14: autoConvert_api_Policy_To_v1_Policy

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


示例15: autoConvert_api_ImageStreamMapping_To_v1_ImageStreamMapping

func autoConvert_api_ImageStreamMapping_To_v1_ImageStreamMapping(in *api.ImageStreamMapping, out *ImageStreamMapping, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	// INFO: in.DockerImageRepository opted out of conversion generation
	if err := Convert_api_Image_To_v1_Image(&in.Image, &out.Image, s); err != nil {
		return err
	}
	out.Tag = in.Tag
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:11,代码来源:zz_generated.conversion.go


示例16: autoConvert_api_User_To_v1_User

func autoConvert_api_User_To_v1_User(in *api.User, out *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_api_ObjectMeta_To_v1_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


示例17: autoConvert_api_Route_To_v1_Route

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


示例18: autoConvert_api_Project_To_v1_Project

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


示例19: autoConvert_api_ImageStreamImport_To_v1_ImageStreamImport

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


示例20: autoConvert_api_OAuthClient_To_v1_OAuthClient

func autoConvert_api_OAuthClient_To_v1_OAuthClient(in *api.OAuthClient, out *OAuthClient, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_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 = GrantHandlerType(in.GrantMethod)
	out.ScopeRestrictions = *(*[]ScopeRestriction)(unsafe.Pointer(&in.ScopeRestrictions))
	return nil
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:12,代码来源:zz_generated.conversion.go



注:本文中的k8s/io/kubernetes/pkg/api/v1.Convert_api_ObjectMeta_To_v1_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