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


Golang v1.Convert_api_ObjectReference_To_v1_ObjectReference函數代碼示例

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


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

示例1: autoConvert_api_UserIdentityMapping_To_v1_UserIdentityMapping

func autoConvert_api_UserIdentityMapping_To_v1_UserIdentityMapping(in *api.UserIdentityMapping, out *UserIdentityMapping, 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 err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.Identity, &out.Identity, s); err != nil {
		return err
	}
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.User, &out.User, s); err != nil {
		return err
	}
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:15,代碼來源:zz_generated.conversion.go

示例2: autoConvert_api_TagImageHook_To_v1_TagImageHook

func autoConvert_api_TagImageHook_To_v1_TagImageHook(in *api.TagImageHook, out *TagImageHook, s conversion.Scope) error {
	out.ContainerName = in.ContainerName
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.To, &out.To, s); err != nil {
		return err
	}
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:7,代碼來源:zz_generated.conversion.go

示例3: autoConvert_api_DeploymentTriggerImageChangeParams_To_v1_DeploymentTriggerImageChangeParams

func autoConvert_api_DeploymentTriggerImageChangeParams_To_v1_DeploymentTriggerImageChangeParams(in *api.DeploymentTriggerImageChangeParams, out *DeploymentTriggerImageChangeParams, s conversion.Scope) error {
	out.Automatic = in.Automatic
	out.ContainerNames = in.ContainerNames
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil {
		return err
	}
	out.LastTriggeredImage = in.LastTriggeredImage
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:9,代碼來源:zz_generated.conversion.go

示例4: autoConvert_api_RepositoryImportSpec_To_v1_RepositoryImportSpec

func autoConvert_api_RepositoryImportSpec_To_v1_RepositoryImportSpec(in *api.RepositoryImportSpec, out *RepositoryImportSpec, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil {
		return err
	}
	if err := Convert_api_TagImportPolicy_To_v1_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil {
		return err
	}
	out.IncludeManifest = in.IncludeManifest
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:10,代碼來源:zz_generated.conversion.go

示例5: autoConvert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec

func autoConvert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec(in *api.DeploymentConfigRollbackSpec, out *DeploymentConfigRollbackSpec, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil {
		return err
	}
	out.Revision = in.Revision
	out.IncludeTriggers = in.IncludeTriggers
	out.IncludeTemplate = in.IncludeTemplate
	out.IncludeReplicationMeta = in.IncludeReplicationMeta
	out.IncludeStrategy = in.IncludeStrategy
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:11,代碼來源:zz_generated.conversion.go

示例6: autoConvert_api_RoleBinding_To_v1_RoleBinding

func autoConvert_api_RoleBinding_To_v1_RoleBinding(in *api.RoleBinding, out *RoleBinding, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if in.Subjects != nil {
		in, out := &in.Subjects, &out.Subjects
		*out = make([]api_v1.ObjectReference, len(*in))
		for i := range *in {
			if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Subjects = nil
	}
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.RoleRef, &out.RoleRef, s); err != nil {
		return err
	}
	return nil
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:20,代碼來源:zz_generated.conversion.go

示例7: autoConvert_api_PolicyBinding_To_v1_PolicyBinding

func autoConvert_api_PolicyBinding_To_v1_PolicyBinding(in *api.PolicyBinding, out *PolicyBinding, 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 := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.PolicyRef, &out.PolicyRef, s); err != nil {
		return err
	}
	if err := Convert_api_RoleBindingsByName_To_v1_NamedRoleBindings(&in.RoleBindings, &out.RoleBindings, s); err != nil {
		return err
	}
	return nil
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:13,代碼來源:zz_generated.conversion.go

示例8: autoConvert_api_Identity_To_v1_Identity

func autoConvert_api_Identity_To_v1_Identity(in *api.Identity, out *Identity, 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.ProviderName = in.ProviderName
	out.ProviderUserName = in.ProviderUserName
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.User, &out.User, s); err != nil {
		return err
	}
	out.Extra = in.Extra
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:15,代碼來源:zz_generated.conversion.go

示例9: autoConvert_api_PodSecurityPolicySubjectReviewStatus_To_v1_PodSecurityPolicySubjectReviewStatus

func autoConvert_api_PodSecurityPolicySubjectReviewStatus_To_v1_PodSecurityPolicySubjectReviewStatus(in *api.PodSecurityPolicySubjectReviewStatus, out *PodSecurityPolicySubjectReviewStatus, s conversion.Scope) error {
	if in.AllowedBy != nil {
		in, out := &in.AllowedBy, &out.AllowedBy
		*out = new(api_v1.ObjectReference)
		if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.AllowedBy = nil
	}
	out.Reason = in.Reason
	if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
		return err
	}
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:16,代碼來源:zz_generated.conversion.go

示例10: autoConvert_api_ImageImportSpec_To_v1_ImageImportSpec

func autoConvert_api_ImageImportSpec_To_v1_ImageImportSpec(in *api.ImageImportSpec, out *ImageImportSpec, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil {
		return err
	}
	if in.To != nil {
		in, out := &in.To, &out.To
		*out = new(api_v1.LocalObjectReference)
		if err := api_v1.Convert_api_LocalObjectReference_To_v1_LocalObjectReference(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.To = nil
	}
	if err := Convert_api_TagImportPolicy_To_v1_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil {
		return err
	}
	out.IncludeManifest = in.IncludeManifest
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:19,代碼來源:zz_generated.conversion.go

示例11: autoConvert_api_TagReference_To_v1_TagReference

func autoConvert_api_TagReference_To_v1_TagReference(in *api.TagReference, out *TagReference, s conversion.Scope) error {
	out.Name = in.Name
	out.Annotations = in.Annotations
	if in.From != nil {
		in, out := &in.From, &out.From
		*out = new(api_v1.ObjectReference)
		if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.From = nil
	}
	out.Reference = in.Reference
	out.Generation = in.Generation
	if err := Convert_api_TagImportPolicy_To_v1_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil {
		return err
	}
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:19,代碼來源:zz_generated.conversion.go

示例12: autoConvert_api_DeploymentCauseImageTrigger_To_v1_DeploymentCauseImageTrigger

func autoConvert_api_DeploymentCauseImageTrigger_To_v1_DeploymentCauseImageTrigger(in *api.DeploymentCauseImageTrigger, out *DeploymentCauseImageTrigger, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil {
		return err
	}
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:6,代碼來源:zz_generated.conversion.go


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