本文整理匯總了Golang中k8s/io/kubernetes/pkg/api/v1.DeepCopy_v1_ObjectMeta函數的典型用法代碼示例。如果您正苦於以下問題:Golang DeepCopy_v1_ObjectMeta函數的具體用法?Golang DeepCopy_v1_ObjectMeta怎麽用?Golang DeepCopy_v1_ObjectMeta使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DeepCopy_v1_ObjectMeta函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: DeepCopy_v1_ImageStreamTag
func DeepCopy_v1_ImageStreamTag(in ImageStreamTag, out *ImageStreamTag, 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.Tag != nil {
in, out := in.Tag, &out.Tag
*out = new(TagReference)
if err := DeepCopy_v1_TagReference(*in, *out, c); err != nil {
return err
}
} else {
out.Tag = nil
}
out.Generation = in.Generation
if in.Conditions != nil {
in, out := in.Conditions, &out.Conditions
*out = make([]TagEventCondition, len(in))
for i := range in {
if err := DeepCopy_v1_TagEventCondition(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
if err := DeepCopy_v1_Image(in.Image, &out.Image, c); err != nil {
return err
}
return nil
}
示例2: DeepCopy_v1_RoleBinding
func DeepCopy_v1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*RoleBinding)
out := out.(*RoleBinding)
out.TypeMeta = in.TypeMeta
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(OptionalNames, len(*in))
copy(*out, *in)
} else {
out.UserNames = nil
}
if in.GroupNames != nil {
in, out := &in.GroupNames, &out.GroupNames
*out = make(OptionalNames, 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 {
(*out)[i] = (*in)[i]
}
} else {
out.Subjects = nil
}
out.RoleRef = in.RoleRef
return nil
}
}
示例3: DeepCopy_v1_ImageStreamTag
func DeepCopy_v1_ImageStreamTag(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ImageStreamTag)
out := out.(*ImageStreamTag)
out.TypeMeta = in.TypeMeta
if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if in.Tag != nil {
in, out := &in.Tag, &out.Tag
*out = new(TagReference)
if err := DeepCopy_v1_TagReference(*in, *out, c); err != nil {
return err
}
} else {
out.Tag = nil
}
out.Generation = in.Generation
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]TagEventCondition, len(*in))
for i := range *in {
if err := DeepCopy_v1_TagEventCondition(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
if err := DeepCopy_v1_Image(&in.Image, &out.Image, c); err != nil {
return err
}
return nil
}
}
示例4: DeepCopy_v1_Image
func DeepCopy_v1_Image(in Image, out *Image, 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
}
out.DockerImageReference = in.DockerImageReference
if err := runtime.DeepCopy_runtime_RawExtension(in.DockerImageMetadata, &out.DockerImageMetadata, c); err != nil {
return err
}
out.DockerImageMetadataVersion = in.DockerImageMetadataVersion
out.DockerImageManifest = in.DockerImageManifest
if in.DockerImageLayers != nil {
in, out := in.DockerImageLayers, &out.DockerImageLayers
*out = make([]ImageLayer, len(in))
for i := range in {
if err := DeepCopy_v1_ImageLayer(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.DockerImageLayers = nil
}
return nil
}
示例5: 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
}
示例6: DeepCopy_v1_User
func DeepCopy_v1_User(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*User)
out := out.(*User)
out.TypeMeta = in.TypeMeta
if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.FullName = in.FullName
if in.Identities != nil {
in, out := &in.Identities, &out.Identities
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Identities = nil
}
if in.Groups != nil {
in, out := &in.Groups, &out.Groups
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Groups = nil
}
return nil
}
}
示例7: DeepCopy_v1_OAuthAccessToken
func DeepCopy_v1_OAuthAccessToken(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*OAuthAccessToken)
out := out.(*OAuthAccessToken)
out.TypeMeta = in.TypeMeta
if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.ClientName = in.ClientName
out.ExpiresIn = in.ExpiresIn
if in.Scopes != nil {
in, out := &in.Scopes, &out.Scopes
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Scopes = nil
}
out.RedirectURI = in.RedirectURI
out.UserName = in.UserName
out.UserUID = in.UserUID
out.AuthorizeToken = in.AuthorizeToken
out.RefreshToken = in.RefreshToken
return nil
}
}
示例8: DeepCopy_v2alpha1_JobTemplateSpec
func DeepCopy_v2alpha1_JobTemplateSpec(in JobTemplateSpec, out *JobTemplateSpec, c *conversion.Cloner) error {
if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v2alpha1_JobSpec(in.Spec, &out.Spec, c); err != nil {
return err
}
return nil
}
示例9: DeepCopy_v1_Scale
func DeepCopy_v1_Scale(in Scale, out *Scale, c *conversion.Cloner) error {
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
}
示例10: DeepCopy_v1beta1_PodSecurityPolicy
func DeepCopy_v1beta1_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1beta1_PodSecurityPolicySpec(in.Spec, &out.Spec, c); err != nil {
return err
}
return nil
}
示例11: DeepCopy_v1beta1_ReplicaSet
func DeepCopy_v1beta1_ReplicaSet(in ReplicaSet, out *ReplicaSet, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1beta1_ReplicaSetSpec(in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
示例12: DeepCopy_v1_NetNamespace
func DeepCopy_v1_NetNamespace(in NetNamespace, out *NetNamespace, 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
}
out.NetName = in.NetName
out.NetID = in.NetID
return nil
}
示例13: DeepCopy_v1_ProjectRequest
func DeepCopy_v1_ProjectRequest(in ProjectRequest, out *ProjectRequest, 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
}
out.DisplayName = in.DisplayName
out.Description = in.Description
return nil
}
示例14: DeepCopy_v1alpha1_PodDisruptionBudget
func DeepCopy_v1alpha1_PodDisruptionBudget(in PodDisruptionBudget, out *PodDisruptionBudget, c *conversion.Cloner) error {
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
}
示例15: DeepCopy_v1_HostSubnet
func DeepCopy_v1_HostSubnet(in HostSubnet, out *HostSubnet, 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
}
out.Host = in.Host
out.HostIP = in.HostIP
out.Subnet = in.Subnet
return nil
}