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


Golang v1.Convert_api_ObjectMeta_To_v1_ObjectMeta函數代碼示例

本文整理匯總了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函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


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