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


Golang api.DeepCopy_api_ObjectReference函數代碼示例

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


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

示例1: DeepCopy_api_SourceBuildStrategy

func DeepCopy_api_SourceBuildStrategy(in SourceBuildStrategy, out *SourceBuildStrategy, c *conversion.Cloner) error {
	if err := api.DeepCopy_api_ObjectReference(in.From, &out.From, c); err != nil {
		return err
	}
	if in.PullSecret != nil {
		in, out := in.PullSecret, &out.PullSecret
		*out = new(api.LocalObjectReference)
		if err := api.DeepCopy_api_LocalObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.PullSecret = nil
	}
	if in.Env != nil {
		in, out := in.Env, &out.Env
		*out = make([]api.EnvVar, len(in))
		for i := range in {
			if err := api.DeepCopy_api_EnvVar(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Env = nil
	}
	out.Scripts = in.Scripts
	if in.Incremental != nil {
		in, out := in.Incremental, &out.Incremental
		*out = new(bool)
		**out = *in
	} else {
		out.Incremental = nil
	}
	out.ForcePull = in.ForcePull
	if in.RuntimeImage != nil {
		in, out := in.RuntimeImage, &out.RuntimeImage
		*out = new(api.ObjectReference)
		if err := api.DeepCopy_api_ObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.RuntimeImage = nil
	}
	if in.RuntimeArtifacts != nil {
		in, out := in.RuntimeArtifacts, &out.RuntimeArtifacts
		*out = make([]ImageSourcePath, len(in))
		for i := range in {
			if err := DeepCopy_api_ImageSourcePath(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.RuntimeArtifacts = nil
	}
	return nil
}
開發者ID:abhgupta,項目名稱:origin,代碼行數:55,代碼來源:deep_copy_generated.go

示例2: DeepCopy_api_UserIdentityMapping

func DeepCopy_api_UserIdentityMapping(in UserIdentityMapping, out *UserIdentityMapping, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectReference(in.Identity, &out.Identity, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectReference(in.User, &out.User, c); err != nil {
		return err
	}
	return nil
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:15,代碼來源:deep_copy_generated.go

示例3: DeepCopy_api_TemplateImage

func DeepCopy_api_TemplateImage(in TemplateImage, out *TemplateImage, c *conversion.Cloner) error {
	out.Image = in.Image
	if in.Ref != nil {
		in, out := in.Ref, &out.Ref
		*out = new(image_api.DockerImageReference)
		if err := image_api.DeepCopy_api_DockerImageReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Ref = nil
	}
	if in.From != nil {
		in, out := in.From, &out.From
		*out = new(api.ObjectReference)
		if err := api.DeepCopy_api_ObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.From = nil
	}
	if in.Container != nil {
		in, out := in.Container, &out.Container
		*out = new(api.Container)
		if err := api.DeepCopy_api_Container(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Container = nil
	}
	return nil
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:31,代碼來源:deep_copy_generated.go

示例4: DeepCopy_api_ClusterPolicyBinding

func DeepCopy_api_ClusterPolicyBinding(in ClusterPolicyBinding, out *ClusterPolicyBinding, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if err := unversioned.DeepCopy_unversioned_Time(in.LastModified, &out.LastModified, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectReference(in.PolicyRef, &out.PolicyRef, c); err != nil {
		return err
	}
	if in.RoleBindings != nil {
		in, out := in.RoleBindings, &out.RoleBindings
		*out = make(map[string]*ClusterRoleBinding)
		for key, val := range in {
			if newVal, err := c.DeepCopy(val); err != nil {
				return err
			} else {
				(*out)[key] = newVal.(*ClusterRoleBinding)
			}
		}
	} else {
		out.RoleBindings = nil
	}
	return nil
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:28,代碼來源:deep_copy_generated.go

示例5: DeepCopy_api_RouteSpec

func DeepCopy_api_RouteSpec(in RouteSpec, out *RouteSpec, c *conversion.Cloner) error {
	out.Host = in.Host
	out.Path = in.Path
	if err := api.DeepCopy_api_ObjectReference(in.To, &out.To, c); err != nil {
		return err
	}
	if in.Port != nil {
		in, out := in.Port, &out.Port
		*out = new(RoutePort)
		if err := DeepCopy_api_RoutePort(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Port = nil
	}
	if in.TLS != nil {
		in, out := in.TLS, &out.TLS
		*out = new(TLSConfig)
		if err := DeepCopy_api_TLSConfig(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.TLS = nil
	}
	return nil
}
開發者ID:RomainVabre,項目名稱:origin,代碼行數:26,代碼來源:deep_copy_generated.go

示例6: DeepCopy_api_TagReference

func DeepCopy_api_TagReference(in TagReference, out *TagReference, c *conversion.Cloner) error {
	out.Name = in.Name
	if in.Annotations != nil {
		in, out := in.Annotations, &out.Annotations
		*out = make(map[string]string)
		for key, val := range in {
			(*out)[key] = val
		}
	} else {
		out.Annotations = nil
	}
	if in.From != nil {
		in, out := in.From, &out.From
		*out = new(api.ObjectReference)
		if err := api.DeepCopy_api_ObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.From = nil
	}
	out.Reference = in.Reference
	if in.Generation != nil {
		in, out := in.Generation, &out.Generation
		*out = new(int64)
		**out = *in
	} else {
		out.Generation = nil
	}
	if err := DeepCopy_api_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil {
		return err
	}
	return nil
}
開發者ID:sgallagher,項目名稱:origin,代碼行數:33,代碼來源:deep_copy_generated.go

示例7: DeepCopy_api_DockerBuildStrategy

func DeepCopy_api_DockerBuildStrategy(in DockerBuildStrategy, out *DockerBuildStrategy, c *conversion.Cloner) error {
	if in.From != nil {
		in, out := in.From, &out.From
		*out = new(api.ObjectReference)
		if err := api.DeepCopy_api_ObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.From = nil
	}
	if in.PullSecret != nil {
		in, out := in.PullSecret, &out.PullSecret
		*out = new(api.LocalObjectReference)
		if err := api.DeepCopy_api_LocalObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.PullSecret = nil
	}
	out.NoCache = in.NoCache
	if in.Env != nil {
		in, out := in.Env, &out.Env
		*out = make([]api.EnvVar, len(in))
		for i := range in {
			if err := api.DeepCopy_api_EnvVar(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Env = nil
	}
	out.ForcePull = in.ForcePull
	out.DockerfilePath = in.DockerfilePath
	return nil
}
開發者ID:tracyrankin,項目名稱:origin,代碼行數:35,代碼來源:deep_copy_generated.go

示例8: DeepCopy_api_SourceBuildStrategy

func DeepCopy_api_SourceBuildStrategy(in SourceBuildStrategy, out *SourceBuildStrategy, c *conversion.Cloner) error {
	if err := api.DeepCopy_api_ObjectReference(in.From, &out.From, c); err != nil {
		return err
	}
	if in.PullSecret != nil {
		in, out := in.PullSecret, &out.PullSecret
		*out = new(api.LocalObjectReference)
		if err := api.DeepCopy_api_LocalObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.PullSecret = nil
	}
	if in.Env != nil {
		in, out := in.Env, &out.Env
		*out = make([]api.EnvVar, len(in))
		for i := range in {
			if err := api.DeepCopy_api_EnvVar(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Env = nil
	}
	out.Scripts = in.Scripts
	out.Incremental = in.Incremental
	out.ForcePull = in.ForcePull
	return nil
}
開發者ID:jdnieto,項目名稱:origin,代碼行數:29,代碼來源:deep_copy_generated.go

示例9: DeepCopy_api_TagImageHook

func DeepCopy_api_TagImageHook(in TagImageHook, out *TagImageHook, c *conversion.Cloner) error {
	out.ContainerName = in.ContainerName
	if err := api.DeepCopy_api_ObjectReference(in.To, &out.To, c); err != nil {
		return err
	}
	return nil
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:7,代碼來源:deep_copy_generated.go

示例10: DeepCopy_api_ImageSource

func DeepCopy_api_ImageSource(in ImageSource, out *ImageSource, c *conversion.Cloner) error {
	if err := api.DeepCopy_api_ObjectReference(in.From, &out.From, c); err != nil {
		return err
	}
	if in.Paths != nil {
		in, out := in.Paths, &out.Paths
		*out = make([]ImageSourcePath, len(in))
		for i := range in {
			if err := DeepCopy_api_ImageSourcePath(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Paths = nil
	}
	if in.PullSecret != nil {
		in, out := in.PullSecret, &out.PullSecret
		*out = new(api.LocalObjectReference)
		if err := api.DeepCopy_api_LocalObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.PullSecret = nil
	}
	return nil
}
開發者ID:tracyrankin,項目名稱:origin,代碼行數:26,代碼來源:deep_copy_generated.go

示例11: DeepCopy_api_DeploymentConfigRollbackSpec

func DeepCopy_api_DeploymentConfigRollbackSpec(in DeploymentConfigRollbackSpec, out *DeploymentConfigRollbackSpec, c *conversion.Cloner) error {
	if err := api.DeepCopy_api_ObjectReference(in.From, &out.From, c); err != nil {
		return err
	}
	out.IncludeTriggers = in.IncludeTriggers
	out.IncludeTemplate = in.IncludeTemplate
	out.IncludeReplicationMeta = in.IncludeReplicationMeta
	out.IncludeStrategy = in.IncludeStrategy
	return nil
}
開發者ID:RomainVabre,項目名稱:origin,代碼行數:10,代碼來源:deep_copy_generated.go

示例12: DeepCopy_api_RepositoryImportSpec

func DeepCopy_api_RepositoryImportSpec(in RepositoryImportSpec, out *RepositoryImportSpec, c *conversion.Cloner) error {
	if err := api.DeepCopy_api_ObjectReference(in.From, &out.From, c); err != nil {
		return err
	}
	if err := DeepCopy_api_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil {
		return err
	}
	out.IncludeManifest = in.IncludeManifest
	return nil
}
開發者ID:sgallagher,項目名稱:origin,代碼行數:10,代碼來源:deep_copy_generated.go

示例13: DeepCopy_api_ImageChangeTrigger

func DeepCopy_api_ImageChangeTrigger(in ImageChangeTrigger, out *ImageChangeTrigger, c *conversion.Cloner) error {
	out.LastTriggeredImageID = in.LastTriggeredImageID
	if in.From != nil {
		in, out := in.From, &out.From
		*out = new(api.ObjectReference)
		if err := api.DeepCopy_api_ObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.From = nil
	}
	return nil
}
開發者ID:tracyrankin,項目名稱:origin,代碼行數:13,代碼來源:deep_copy_generated.go

示例14: DeepCopy_api_ImageChangeCause

func DeepCopy_api_ImageChangeCause(in ImageChangeCause, out *ImageChangeCause, c *conversion.Cloner) error {
	out.ImageID = in.ImageID
	if in.FromRef != nil {
		in, out := in.FromRef, &out.FromRef
		*out = new(api.ObjectReference)
		if err := api.DeepCopy_api_ObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.FromRef = nil
	}
	return nil
}
開發者ID:tracyrankin,項目名稱:origin,代碼行數:13,代碼來源:deep_copy_generated.go

示例15: DeepCopy_api_RoleBinding

func DeepCopy_api_RoleBinding(in RoleBinding, out *RoleBinding, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
		return err
	}
	if in.Subjects != nil {
		in, out := in.Subjects, &out.Subjects
		*out = make([]api.ObjectReference, len(in))
		for i := range in {
			if err := api.DeepCopy_api_ObjectReference(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Subjects = nil
	}
	if err := api.DeepCopy_api_ObjectReference(in.RoleRef, &out.RoleRef, c); err != nil {
		return err
	}
	return nil
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:23,代碼來源:deep_copy_generated.go


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