本文整理汇总了Golang中k8s/io/kubernetes/pkg/api/v1.Convert_v1_ObjectMeta_To_api_ObjectMeta函数的典型用法代码示例。如果您正苦于以下问题:Golang Convert_v1_ObjectMeta_To_api_ObjectMeta函数的具体用法?Golang Convert_v1_ObjectMeta_To_api_ObjectMeta怎么用?Golang Convert_v1_ObjectMeta_To_api_ObjectMeta使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Convert_v1_ObjectMeta_To_api_ObjectMeta函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: autoConvert_v1_ImageStreamTag_To_api_ImageStreamTag
func autoConvert_v1_ImageStreamTag_To_api_ImageStreamTag(in *ImageStreamTag, out *api.ImageStreamTag, s conversion.Scope) error {
if err := pkg_api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if in.Tag != nil {
in, out := &in.Tag, &out.Tag
*out = new(api.TagReference)
if err := Convert_v1_TagReference_To_api_TagReference(*in, *out, s); err != nil {
return err
}
} else {
out.Tag = nil
}
out.Generation = in.Generation
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]api.TagEventCondition, len(*in))
for i := range *in {
if err := Convert_v1_TagEventCondition_To_api_TagEventCondition(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
if err := Convert_v1_Image_To_api_Image(&in.Image, &out.Image, s); err != nil {
return err
}
return nil
}
示例2: autoConvert_v1_Image_To_api_Image
func autoConvert_v1_Image_To_api_Image(in *Image, out *api.Image, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.DockerImageReference = in.DockerImageReference
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.DockerImageMetadata, &out.DockerImageMetadata, 0); err != nil {
return err
}
out.DockerImageMetadataVersion = in.DockerImageMetadataVersion
out.DockerImageManifest = in.DockerImageManifest
out.DockerImageLayers = *(*[]api.ImageLayer)(unsafe.Pointer(&in.DockerImageLayers))
if in.Signatures != nil {
in, out := &in.Signatures, &out.Signatures
*out = make([]api.ImageSignature, len(*in))
for i := range *in {
if err := Convert_v1_ImageSignature_To_api_ImageSignature(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Signatures = nil
}
out.DockerImageSignatures = *(*[][]byte)(unsafe.Pointer(&in.DockerImageSignatures))
out.DockerImageManifestMediaType = in.DockerImageManifestMediaType
out.DockerImageConfig = in.DockerImageConfig
return nil
}
示例3: autoConvert_v1_Template_To_api_Template
func autoConvert_v1_Template_To_api_Template(in *Template, out *template_api.Template, s conversion.Scope) error {
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.Message = in.Message
if in.Objects != nil {
in, out := &in.Objects, &out.Objects
*out = make([]runtime.Object, len(*in))
for i := range *in {
if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Objects = nil
}
if in.Parameters != nil {
in, out := &in.Parameters, &out.Parameters
*out = make([]template_api.Parameter, len(*in))
for i := range *in {
if err := Convert_v1_Parameter_To_api_Parameter(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Parameters = nil
}
out.ObjectLabels = in.ObjectLabels
return nil
}
示例4: autoConvert_v1_NetNamespace_To_api_NetNamespace
func autoConvert_v1_NetNamespace_To_api_NetNamespace(in *NetNamespace, out *api.NetNamespace, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.NetName = in.NetName
out.NetID = in.NetID
return nil
}
示例5: autoConvert_v1_ProjectRequest_To_api_ProjectRequest
func autoConvert_v1_ProjectRequest_To_api_ProjectRequest(in *ProjectRequest, out *api.ProjectRequest, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.DisplayName = in.DisplayName
out.Description = in.Description
return nil
}
示例6: autoConvert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy
func autoConvert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy(in *EgressNetworkPolicy, out *api.EgressNetworkPolicy, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if err := Convert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
示例7: autoConvert_v1_RoleBindingRestriction_To_api_RoleBindingRestriction
func autoConvert_v1_RoleBindingRestriction_To_api_RoleBindingRestriction(in *RoleBindingRestriction, out *api.RoleBindingRestriction, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if err := Convert_v1_RoleBindingRestrictionSpec_To_api_RoleBindingRestrictionSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
示例8: autoConvert_v1_HostSubnet_To_api_HostSubnet
func autoConvert_v1_HostSubnet_To_api_HostSubnet(in *HostSubnet, out *api.HostSubnet, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.Host = in.Host
out.HostIP = in.HostIP
out.Subnet = in.Subnet
return nil
}
示例9: autoConvert_v1_OAuthRedirectReference_To_api_OAuthRedirectReference
func autoConvert_v1_OAuthRedirectReference_To_api_OAuthRedirectReference(in *OAuthRedirectReference, out *api.OAuthRedirectReference, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if err := Convert_v1_RedirectReference_To_api_RedirectReference(&in.Reference, &out.Reference, s); err != nil {
return err
}
return nil
}
示例10: autoConvert_v1_ImageStreamImage_To_api_ImageStreamImage
func autoConvert_v1_ImageStreamImage_To_api_ImageStreamImage(in *ImageStreamImage, out *api.ImageStreamImage, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if err := Convert_v1_Image_To_api_Image(&in.Image, &out.Image, s); err != nil {
return err
}
return nil
}
示例11: autoConvert_v1_OAuthClientAuthorization_To_api_OAuthClientAuthorization
func autoConvert_v1_OAuthClientAuthorization_To_api_OAuthClientAuthorization(in *OAuthClientAuthorization, out *api.OAuthClientAuthorization, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.ClientName = in.ClientName
out.UserName = in.UserName
out.UserUID = in.UserUID
out.Scopes = *(*[]string)(unsafe.Pointer(&in.Scopes))
return nil
}
示例12: autoConvert_v1_Policy_To_api_Policy
func autoConvert_v1_Policy_To_api_Policy(in *Policy, out *api.Policy, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.LastModified = in.LastModified
if err := Convert_v1_NamedRoles_To_api_RolesByName(&in.Roles, &out.Roles, s); err != nil {
return err
}
return nil
}
示例13: autoConvert_v1_ClusterNetwork_To_api_ClusterNetwork
func autoConvert_v1_ClusterNetwork_To_api_ClusterNetwork(in *ClusterNetwork, out *api.ClusterNetwork, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.Network = in.Network
out.HostSubnetLength = in.HostSubnetLength
out.ServiceNetwork = in.ServiceNetwork
out.PluginName = in.PluginName
return nil
}
示例14: autoConvert_v1_Group_To_api_Group
func autoConvert_v1_Group_To_api_Group(in *Group, out *user_api.Group, s conversion.Scope) error {
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
out.Users = in.Users
return nil
}
示例15: autoConvert_v1_AppliedClusterResourceQuota_To_api_AppliedClusterResourceQuota
func autoConvert_v1_AppliedClusterResourceQuota_To_api_AppliedClusterResourceQuota(in *AppliedClusterResourceQuota, out *api.AppliedClusterResourceQuota, s conversion.Scope) error {
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if err := Convert_v1_ClusterResourceQuotaSpec_To_api_ClusterResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1_ClusterResourceQuotaStatus_To_api_ClusterResourceQuotaStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}