本文整理汇总了Golang中k8s/io/kubernetes/pkg/api/v1.DeepCopy_v1_ObjectReference函数的典型用法代码示例。如果您正苦于以下问题:Golang DeepCopy_v1_ObjectReference函数的具体用法?Golang DeepCopy_v1_ObjectReference怎么用?Golang DeepCopy_v1_ObjectReference使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DeepCopy_v1_ObjectReference函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: DeepCopy_v1_SourceBuildStrategy
func DeepCopy_v1_SourceBuildStrategy(in SourceBuildStrategy, out *SourceBuildStrategy, c *conversion.Cloner) error {
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
return err
}
if in.PullSecret != nil {
in, out := in.PullSecret, &out.PullSecret
*out = new(api_v1.LocalObjectReference)
if err := api_v1.DeepCopy_v1_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_v1.EnvVar, len(in))
for i := range in {
if err := api_v1.DeepCopy_v1_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_v1.ObjectReference)
if err := api_v1.DeepCopy_v1_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_v1_ImageSourcePath(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.RuntimeArtifacts = nil
}
return nil
}
示例2: DeepCopy_v1_UserIdentityMapping
func DeepCopy_v1_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_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := api_v1.DeepCopy_v1_ObjectReference(in.Identity, &out.Identity, c); err != nil {
return err
}
if err := api_v1.DeepCopy_v1_ObjectReference(in.User, &out.User, c); err != nil {
return err
}
return nil
}
示例3: DeepCopy_v1_TagImageHook
func DeepCopy_v1_TagImageHook(in TagImageHook, out *TagImageHook, c *conversion.Cloner) error {
out.ContainerName = in.ContainerName
if err := api_v1.DeepCopy_v1_ObjectReference(in.To, &out.To, c); err != nil {
return err
}
return nil
}
示例4: DeepCopy_v1_SourceBuildStrategy
func DeepCopy_v1_SourceBuildStrategy(in SourceBuildStrategy, out *SourceBuildStrategy, c *conversion.Cloner) error {
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
return err
}
if in.PullSecret != nil {
in, out := in.PullSecret, &out.PullSecret
*out = new(api_v1.LocalObjectReference)
if err := api_v1.DeepCopy_v1_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_v1.EnvVar, len(in))
for i := range in {
if err := api_v1.DeepCopy_v1_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
}
示例5: DeepCopy_v1_RouteSpec
func DeepCopy_v1_RouteSpec(in RouteSpec, out *RouteSpec, c *conversion.Cloner) error {
out.Host = in.Host
out.Path = in.Path
if err := api_v1.DeepCopy_v1_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_v1_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_v1_TLSConfig(*in, *out, c); err != nil {
return err
}
} else {
out.TLS = nil
}
return nil
}
示例6: DeepCopy_v1_ImageSource
func DeepCopy_v1_ImageSource(in ImageSource, out *ImageSource, c *conversion.Cloner) error {
if err := api_v1.DeepCopy_v1_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_v1_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_v1.LocalObjectReference)
if err := api_v1.DeepCopy_v1_LocalObjectReference(*in, *out, c); err != nil {
return err
}
} else {
out.PullSecret = nil
}
return nil
}
示例7: DeepCopy_v1_TagReference
func DeepCopy_v1_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_v1.ObjectReference)
if err := api_v1.DeepCopy_v1_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_v1_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil {
return err
}
return nil
}
示例8: DeepCopy_v1_DockerBuildStrategy
func DeepCopy_v1_DockerBuildStrategy(in DockerBuildStrategy, out *DockerBuildStrategy, c *conversion.Cloner) error {
if in.From != nil {
in, out := in.From, &out.From
*out = new(api_v1.ObjectReference)
if err := api_v1.DeepCopy_v1_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_v1.LocalObjectReference)
if err := api_v1.DeepCopy_v1_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_v1.EnvVar, len(in))
for i := range in {
if err := api_v1.DeepCopy_v1_EnvVar(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Env = nil
}
out.ForcePull = in.ForcePull
out.DockerfilePath = in.DockerfilePath
return nil
}
示例9: DeepCopy_v1_ClusterPolicyBinding
func DeepCopy_v1_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_v1.DeepCopy_v1_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_v1.DeepCopy_v1_ObjectReference(in.PolicyRef, &out.PolicyRef, c); err != nil {
return err
}
if in.RoleBindings != nil {
in, out := in.RoleBindings, &out.RoleBindings
*out = make([]NamedClusterRoleBinding, len(in))
for i := range in {
if err := DeepCopy_v1_NamedClusterRoleBinding(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.RoleBindings = nil
}
return nil
}
示例10: DeepCopy_v1_DeploymentConfigRollbackSpec
func DeepCopy_v1_DeploymentConfigRollbackSpec(in DeploymentConfigRollbackSpec, out *DeploymentConfigRollbackSpec, c *conversion.Cloner) error {
if err := api_v1.DeepCopy_v1_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
}
示例11: DeepCopy_v1_RepositoryImportSpec
func DeepCopy_v1_RepositoryImportSpec(in RepositoryImportSpec, out *RepositoryImportSpec, c *conversion.Cloner) error {
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
return err
}
if err := DeepCopy_v1_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil {
return err
}
out.IncludeManifest = in.IncludeManifest
return nil
}
示例12: DeepCopy_v1_ImageChangeTrigger
func DeepCopy_v1_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_v1.ObjectReference)
if err := api_v1.DeepCopy_v1_ObjectReference(*in, *out, c); err != nil {
return err
}
} else {
out.From = nil
}
return nil
}
示例13: DeepCopy_v1_ImageChangeCause
func DeepCopy_v1_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_v1.ObjectReference)
if err := api_v1.DeepCopy_v1_ObjectReference(*in, *out, c); err != nil {
return err
}
} else {
out.FromRef = nil
}
return nil
}
示例14: DeepCopy_v1_RoleBinding
func DeepCopy_v1_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_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if in.UserNames != nil {
in, out := in.UserNames, &out.UserNames
*out = make([]string, len(in))
copy(*out, in)
} else {
out.UserNames = nil
}
if in.GroupNames != nil {
in, out := in.GroupNames, &out.GroupNames
*out = make([]string, len(in))
copy(*out, in)
} else {
out.GroupNames = nil
}
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.DeepCopy_v1_ObjectReference(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Subjects = nil
}
if err := api_v1.DeepCopy_v1_ObjectReference(in.RoleRef, &out.RoleRef, c); err != nil {
return err
}
return nil
}
示例15: DeepCopy_v1_DeploymentTriggerImageChangeParams
func DeepCopy_v1_DeploymentTriggerImageChangeParams(in DeploymentTriggerImageChangeParams, out *DeploymentTriggerImageChangeParams, c *conversion.Cloner) error {
out.Automatic = in.Automatic
if in.ContainerNames != nil {
in, out := in.ContainerNames, &out.ContainerNames
*out = make([]string, len(in))
copy(*out, in)
} else {
out.ContainerNames = nil
}
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
return err
}
out.LastTriggeredImage = in.LastTriggeredImage
return nil
}