本文整理匯總了Golang中k8s/io/kubernetes/pkg/api.DeepCopy_api_ObjectMeta函數的典型用法代碼示例。如果您正苦於以下問題:Golang DeepCopy_api_ObjectMeta函數的具體用法?Golang DeepCopy_api_ObjectMeta怎麽用?Golang DeepCopy_api_ObjectMeta使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DeepCopy_api_ObjectMeta函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: DeepCopy_api_Policy
func DeepCopy_api_Policy(in Policy, out *Policy, 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 in.Roles != nil {
in, out := in.Roles, &out.Roles
*out = make(map[string]*Role)
for key, val := range in {
if newVal, err := c.DeepCopy(val); err != nil {
return err
} else {
(*out)[key] = newVal.(*Role)
}
}
} else {
out.Roles = nil
}
return nil
}
示例2: DeepCopy_api_User
func DeepCopy_api_User(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*User)
out := out.(*User)
out.TypeMeta = in.TypeMeta
if err := pkg_api.DeepCopy_api_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
}
}
示例3: 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
}
示例4: DeepCopy_api_OAuthAccessToken
func DeepCopy_api_OAuthAccessToken(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*OAuthAccessToken)
out := out.(*OAuthAccessToken)
out.TypeMeta = in.TypeMeta
if err := pkg_api.DeepCopy_api_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
}
}
示例5: DeepCopy_api_ImageStreamTag
func DeepCopy_api_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.DeepCopy_api_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_api_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_api_TagEventCondition(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
if err := DeepCopy_api_Image(in.Image, &out.Image, c); err != nil {
return err
}
return nil
}
示例6: DeepCopy_api_ImageStreamTag
func DeepCopy_api_ImageStreamTag(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ImageStreamTag)
out := out.(*ImageStreamTag)
out.TypeMeta = in.TypeMeta
if err := pkg_api.DeepCopy_api_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_api_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_api_TagEventCondition(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
if err := DeepCopy_api_Image(&in.Image, &out.Image, c); err != nil {
return err
}
return nil
}
}
示例7: DeepCopy_api_Image
func DeepCopy_api_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.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.DockerImageReference = in.DockerImageReference
if err := DeepCopy_api_DockerImage(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_api_ImageLayer(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.DockerImageLayers = nil
}
return nil
}
示例8: DeepCopy_batch_JobTemplateSpec
func DeepCopy_batch_JobTemplateSpec(in JobTemplateSpec, out *JobTemplateSpec, c *conversion.Cloner) error {
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_batch_JobSpec(in.Spec, &out.Spec, c); err != nil {
return err
}
return nil
}
示例9: DeepCopy_autoscaling_Scale
func DeepCopy_autoscaling_Scale(in Scale, out *Scale, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.Spec = in.Spec
out.Status = in.Status
return nil
}
示例10: DeepCopy_extensions_PodSecurityPolicy
func DeepCopy_extensions_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_extensions_PodSecurityPolicySpec(in.Spec, &out.Spec, c); err != nil {
return err
}
return nil
}
示例11: DeepCopy_api_ProjectRequest
func DeepCopy_api_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.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.DisplayName = in.DisplayName
out.Description = in.Description
return nil
}
示例12: DeepCopy_api_NetNamespace
func DeepCopy_api_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.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.NetName = in.NetName
out.NetID = in.NetID
return nil
}
示例13: DeepCopy_extensions_Scale
func DeepCopy_extensions_Scale(in Scale, out *Scale, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.Spec = in.Spec
if err := DeepCopy_extensions_ScaleStatus(in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
示例14: DeepCopy_extensions_ReplicaSet
func DeepCopy_extensions_ReplicaSet(in ReplicaSet, out *ReplicaSet, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_extensions_ReplicaSetSpec(in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
示例15: DeepCopy_policy_PodDisruptionBudget
func DeepCopy_policy_PodDisruptionBudget(in PodDisruptionBudget, out *PodDisruptionBudget, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_policy_PodDisruptionBudgetSpec(in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}