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


Golang v1.DeepCopy_v1_ObjectMeta函數代碼示例

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


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

示例1: DeepCopy_v1_Scale

func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*Scale)
		out := out.(*Scale)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.Spec = in.Spec
		out.Status = in.Status
		return nil
	}
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:13,代碼來源:zz_generated.deepcopy.go

示例2: DeepCopy_v1alpha1_ImageReview

func DeepCopy_v1alpha1_ImageReview(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ImageReview)
		out := out.(*ImageReview)
		out.TypeMeta = in.TypeMeta
		if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if err := DeepCopy_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil {
			return err
		}
		out.Status = in.Status
		return nil
	}
}
開發者ID:Q-Lee,項目名稱:kubernetes,代碼行數:15,代碼來源:zz_generated.deepcopy.go

示例3: DeepCopy_v1beta1_TokenReview

func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*TokenReview)
		out := out.(*TokenReview)
		out.TypeMeta = in.TypeMeta
		if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.Spec = in.Spec
		if err := DeepCopy_v1beta1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
			return err
		}
		return nil
	}
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:15,代碼來源:zz_generated.deepcopy.go

示例4: DeepCopy_v1alpha1_PodDisruptionBudget

func DeepCopy_v1alpha1_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PodDisruptionBudget)
		out := out.(*PodDisruptionBudget)
		out.TypeMeta = in.TypeMeta
		if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if err := DeepCopy_v1alpha1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil {
			return err
		}
		out.Status = in.Status
		return nil
	}
}
開發者ID:maisem,項目名稱:kubernetes,代碼行數:15,代碼來源:zz_generated.deepcopy.go

示例5: DeepCopy_v1alpha1_CertificateSigningRequest

func DeepCopy_v1alpha1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*CertificateSigningRequest)
		out := out.(*CertificateSigningRequest)
		out.TypeMeta = in.TypeMeta
		if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if err := DeepCopy_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil {
			return err
		}
		if err := DeepCopy_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil {
			return err
		}
		return nil
	}
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:17,代碼來源:zz_generated.deepcopy.go

示例6: DeepCopy_v1alpha1_Eviction

func DeepCopy_v1alpha1_Eviction(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*Eviction)
		out := out.(*Eviction)
		out.TypeMeta = in.TypeMeta
		if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if in.DeleteOptions != nil {
			in, out := &in.DeleteOptions, &out.DeleteOptions
			*out = new(v1.DeleteOptions)
			if err := v1.DeepCopy_v1_DeleteOptions(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.DeleteOptions = nil
		}
		return nil
	}
}
開發者ID:maisem,項目名稱:kubernetes,代碼行數:20,代碼來源:zz_generated.deepcopy.go

示例7: DeepCopy_v1alpha1_ClusterRoleBinding

func DeepCopy_v1alpha1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterRoleBinding)
		out := out.(*ClusterRoleBinding)
		out.TypeMeta = in.TypeMeta
		if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if in.Subjects != nil {
			in, out := &in.Subjects, &out.Subjects
			*out = make([]Subject, len(*in))
			for i := range *in {
				(*out)[i] = (*in)[i]
			}
		} else {
			out.Subjects = nil
		}
		out.RoleRef = in.RoleRef
		return nil
	}
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:21,代碼來源:zz_generated.deepcopy.go

示例8: DeepCopy_v1beta1_StorageClass

func DeepCopy_v1beta1_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*StorageClass)
		out := out.(*StorageClass)
		out.TypeMeta = in.TypeMeta
		if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.Provisioner = in.Provisioner
		if in.Parameters != nil {
			in, out := &in.Parameters, &out.Parameters
			*out = make(map[string]string)
			for key, val := range *in {
				(*out)[key] = val
			}
		} else {
			out.Parameters = nil
		}
		return nil
	}
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:21,代碼來源:zz_generated.deepcopy.go

示例9: DeepCopy_v1alpha1_ClusterRole

func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterRole)
		out := out.(*ClusterRole)
		out.TypeMeta = in.TypeMeta
		if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if in.Rules != nil {
			in, out := &in.Rules, &out.Rules
			*out = make([]PolicyRule, len(*in))
			for i := range *in {
				if err := DeepCopy_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Rules = nil
		}
		return nil
	}
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:22,代碼來源:zz_generated.deepcopy.go


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