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


Golang v1.Convert_v1_ObjectReference_To_api_ObjectReference函數代碼示例

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


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

示例1: autoConvert_v1_UserIdentityMapping_To_api_UserIdentityMapping

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

示例2: autoConvert_v1_TagImageHook_To_api_TagImageHook

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

示例3: autoConvert_v1_DeploymentTriggerImageChangeParams_To_api_DeploymentTriggerImageChangeParams

func autoConvert_v1_DeploymentTriggerImageChangeParams_To_api_DeploymentTriggerImageChangeParams(in *DeploymentTriggerImageChangeParams, out *api.DeploymentTriggerImageChangeParams, s conversion.Scope) error {
	out.Automatic = in.Automatic
	out.ContainerNames = in.ContainerNames
	if err := api_v1.Convert_v1_ObjectReference_To_api_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_v1_RepositoryImportSpec_To_api_RepositoryImportSpec

func autoConvert_v1_RepositoryImportSpec_To_api_RepositoryImportSpec(in *RepositoryImportSpec, out *api.RepositoryImportSpec, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.From, &out.From, s); err != nil {
		return err
	}
	if err := Convert_v1_TagImportPolicy_To_api_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_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec

func autoConvert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec(in *DeploymentConfigRollbackSpec, out *api.DeploymentConfigRollbackSpec, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectReference_To_api_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_v1_RoleBinding_To_api_RoleBinding

func autoConvert_v1_RoleBinding_To_api_RoleBinding(in *RoleBinding, out *api.RoleBinding, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	// INFO: in.UserNames opted out of conversion generation
	// INFO: in.GroupNames opted out of conversion generation
	if in.Subjects != nil {
		in, out := &in.Subjects, &out.Subjects
		*out = make([]pkg_api.ObjectReference, len(*in))
		for i := range *in {
			if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Subjects = nil
	}
	if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.RoleRef, &out.RoleRef, s); err != nil {
		return err
	}
	return nil
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:22,代碼來源:zz_generated.conversion.go

示例7: autoConvert_v1_PolicyBinding_To_api_PolicyBinding

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

示例8: autoConvert_v1_Identity_To_api_Identity

func autoConvert_v1_Identity_To_api_Identity(in *Identity, out *api.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_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.ProviderName = in.ProviderName
	out.ProviderUserName = in.ProviderUserName
	if err := api_v1.Convert_v1_ObjectReference_To_api_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_v1_PodSecurityPolicySubjectReviewStatus_To_api_PodSecurityPolicySubjectReviewStatus

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

示例10: autoConvert_v1_TagReference_To_api_TagReference

func autoConvert_v1_TagReference_To_api_TagReference(in *TagReference, out *api.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(pkg_api.ObjectReference)
		if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.From = nil
	}
	out.Reference = in.Reference
	out.Generation = in.Generation
	if err := Convert_v1_TagImportPolicy_To_api_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil {
		return err
	}
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:19,代碼來源:zz_generated.conversion.go

示例11: autoConvert_v1_ImageImportSpec_To_api_ImageImportSpec

func autoConvert_v1_ImageImportSpec_To_api_ImageImportSpec(in *ImageImportSpec, out *api.ImageImportSpec, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.From, &out.From, s); err != nil {
		return err
	}
	if in.To != nil {
		in, out := &in.To, &out.To
		*out = new(pkg_api.LocalObjectReference)
		if err := api_v1.Convert_v1_LocalObjectReference_To_api_LocalObjectReference(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.To = nil
	}
	if err := Convert_v1_TagImportPolicy_To_api_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil {
		return err
	}
	out.IncludeManifest = in.IncludeManifest
	return nil
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:19,代碼來源:zz_generated.conversion.go

示例12: autoConvert_v1_DeploymentCauseImageTrigger_To_api_DeploymentCauseImageTrigger

func autoConvert_v1_DeploymentCauseImageTrigger_To_api_DeploymentCauseImageTrigger(in *DeploymentCauseImageTrigger, out *api.DeploymentCauseImageTrigger, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectReference_To_api_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_v1_ObjectReference_To_api_ObjectReference函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。