本文整理匯總了Golang中k8s/io/kubernetes/pkg/api.Convert_unversioned_Time_To_unversioned_Time函數的典型用法代碼示例。如果您正苦於以下問題:Golang Convert_unversioned_Time_To_unversioned_Time函數的具體用法?Golang Convert_unversioned_Time_To_unversioned_Time怎麽用?Golang Convert_unversioned_Time_To_unversioned_Time使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Convert_unversioned_Time_To_unversioned_Time函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: autoConvert_batch_JobStatus_To_v2alpha1_JobStatus
func autoConvert_batch_JobStatus_To_v2alpha1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]JobCondition, len(*in))
for i := range *in {
if err := Convert_batch_JobCondition_To_v2alpha1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
if in.StartTime != nil {
in, out := &in.StartTime, &out.StartTime
*out = new(unversioned.Time)
if err := api.Convert_unversioned_Time_To_unversioned_Time(*in, *out, s); err != nil {
return err
}
} else {
out.StartTime = nil
}
if in.CompletionTime != nil {
in, out := &in.CompletionTime, &out.CompletionTime
*out = new(unversioned.Time)
if err := api.Convert_unversioned_Time_To_unversioned_Time(*in, *out, s); err != nil {
return err
}
} else {
out.CompletionTime = nil
}
out.Active = in.Active
out.Succeeded = in.Succeeded
out.Failed = in.Failed
return nil
}
示例2: autoConvert_v1alpha1_ClusterCondition_To_federation_ClusterCondition
func autoConvert_v1alpha1_ClusterCondition_To_federation_ClusterCondition(in *ClusterCondition, out *federation.ClusterCondition, s conversion.Scope) error {
out.Type = federation.ClusterConditionType(in.Type)
out.Status = api.ConditionStatus(in.Status)
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
return err
}
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
return err
}
out.Reason = in.Reason
out.Message = in.Message
return nil
}
示例3: autoConvert_api_SignatureCondition_To_v1_SignatureCondition
func autoConvert_api_SignatureCondition_To_v1_SignatureCondition(in *api.SignatureCondition, out *SignatureCondition, s conversion.Scope) error {
out.Type = SignatureConditionType(in.Type)
out.Status = api_v1.ConditionStatus(in.Status)
if err := pkg_api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
return err
}
if err := pkg_api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
return err
}
out.Reason = in.Reason
out.Message = in.Message
return nil
}
示例4: autoConvert_federation_ClusterCondition_To_v1alpha1_ClusterCondition
func autoConvert_federation_ClusterCondition_To_v1alpha1_ClusterCondition(in *federation.ClusterCondition, out *ClusterCondition, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*federation.ClusterCondition))(in)
}
out.Type = ClusterConditionType(in.Type)
out.Status = v1.ConditionStatus(in.Status)
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
return err
}
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
return err
}
out.Reason = in.Reason
out.Message = in.Message
return nil
}
示例5: autoConvert_v1_JobCondition_To_extensions_JobCondition
func autoConvert_v1_JobCondition_To_extensions_JobCondition(in *JobCondition, out *extensions.JobCondition, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*JobCondition))(in)
}
out.Type = extensions.JobConditionType(in.Type)
out.Status = api.ConditionStatus(in.Status)
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
return err
}
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
return err
}
out.Reason = in.Reason
out.Message = in.Message
return nil
}
示例6: autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus
func autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *extensions.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*extensions.HorizontalPodAutoscalerStatus))(in)
}
if in.ObservedGeneration != nil {
in, out := &in.ObservedGeneration, &out.ObservedGeneration
*out = new(int64)
**out = **in
} else {
out.ObservedGeneration = nil
}
if in.LastScaleTime != nil {
in, out := &in.LastScaleTime, &out.LastScaleTime
*out = new(unversioned.Time)
if err := api.Convert_unversioned_Time_To_unversioned_Time(*in, *out, s); err != nil {
return err
}
} else {
out.LastScaleTime = nil
}
out.CurrentReplicas = in.CurrentReplicas
out.DesiredReplicas = in.DesiredReplicas
if in.CurrentCPUUtilizationPercentage != nil {
in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
*out = new(int32)
**out = **in
} else {
out.CurrentCPUUtilizationPercentage = nil
}
return nil
}
示例7: autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus
func autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *extensions.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*extensions.HorizontalPodAutoscalerStatus))(in)
}
if in.ObservedGeneration != nil {
out.ObservedGeneration = new(int64)
*out.ObservedGeneration = *in.ObservedGeneration
} else {
out.ObservedGeneration = nil
}
// unable to generate simple pointer conversion for unversioned.Time -> unversioned.Time
if in.LastScaleTime != nil {
out.LastScaleTime = new(unversioned.Time)
if err := api.Convert_unversioned_Time_To_unversioned_Time(in.LastScaleTime, out.LastScaleTime, s); err != nil {
return err
}
} else {
out.LastScaleTime = nil
}
out.CurrentReplicas = int32(in.CurrentReplicas)
out.DesiredReplicas = int32(in.DesiredReplicas)
if in.CurrentCPUUtilizationPercentage != nil {
out.CurrentCPUUtilizationPercentage = new(int32)
*out.CurrentCPUUtilizationPercentage = int32(*in.CurrentCPUUtilizationPercentage)
} else {
out.CurrentCPUUtilizationPercentage = nil
}
return nil
}
示例8: autoConvert_v1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus
func autoConvert_v1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *extensions.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
if in.ObservedGeneration != nil {
in, out := &in.ObservedGeneration, &out.ObservedGeneration
*out = new(int64)
**out = **in
} else {
out.ObservedGeneration = nil
}
if in.LastScaleTime != nil {
in, out := &in.LastScaleTime, &out.LastScaleTime
*out = new(unversioned.Time)
if err := api.Convert_unversioned_Time_To_unversioned_Time(*in, *out, s); err != nil {
return err
}
} else {
out.LastScaleTime = nil
}
out.CurrentReplicas = in.CurrentReplicas
out.DesiredReplicas = in.DesiredReplicas
if in.CurrentCPUUtilizationPercentage != nil {
in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
*out = new(int32)
**out = **in
} else {
out.CurrentCPUUtilizationPercentage = nil
}
return nil
}
示例9: autoConvert_v1_ObjectMeta_To_api_ObjectMeta
func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *v1.ObjectMeta, out *api.ObjectMeta, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*v1.ObjectMeta))(in)
}
out.Name = in.Name
out.GenerateName = in.GenerateName
out.Namespace = in.Namespace
out.SelfLink = in.SelfLink
out.UID = in.UID
out.ResourceVersion = in.ResourceVersion
out.Generation = in.Generation
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.CreationTimestamp, &out.CreationTimestamp, s); err != nil {
return err
}
// unable to generate simple pointer conversion for unversioned.Time -> unversioned.Time
if in.DeletionTimestamp != nil {
out.DeletionTimestamp = new(unversioned.Time)
if err := api.Convert_unversioned_Time_To_unversioned_Time(in.DeletionTimestamp, out.DeletionTimestamp, s); err != nil {
return err
}
} else {
out.DeletionTimestamp = nil
}
if in.DeletionGracePeriodSeconds != nil {
out.DeletionGracePeriodSeconds = new(int64)
*out.DeletionGracePeriodSeconds = *in.DeletionGracePeriodSeconds
} else {
out.DeletionGracePeriodSeconds = nil
}
if in.Labels != nil {
out.Labels = make(map[string]string)
for key, val := range in.Labels {
out.Labels[key] = val
}
} else {
out.Labels = nil
}
if in.Annotations != nil {
out.Annotations = make(map[string]string)
for key, val := range in.Annotations {
out.Annotations[key] = val
}
} else {
out.Annotations = nil
}
return nil
}
示例10: autoConvert_v1_TagEvent_To_api_TagEvent
func autoConvert_v1_TagEvent_To_api_TagEvent(in *TagEvent, out *api.TagEvent, s conversion.Scope) error {
if err := pkg_api.Convert_unversioned_Time_To_unversioned_Time(&in.Created, &out.Created, s); err != nil {
return err
}
out.DockerImageReference = in.DockerImageReference
out.Image = in.Image
out.Generation = in.Generation
return nil
}
示例11:
func autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error {
out.Type = certificates.RequestConditionType(in.Type)
out.Reason = in.Reason
out.Message = in.Message
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastUpdateTime, &out.LastUpdateTime, s); err != nil {
return err
}
return nil
}
示例12: autoConvert_api_ImageSignature_To_v1_ImageSignature
func autoConvert_api_ImageSignature_To_v1_ImageSignature(in *image_api.ImageSignature, out *ImageSignature, s conversion.Scope) error {
out.Type = in.Type
if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Content, &out.Content, s); err != nil {
return err
}
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]SignatureCondition, len(*in))
for i := range *in {
if err := Convert_api_SignatureCondition_To_v1_SignatureCondition(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
out.ImageIdentity = in.ImageIdentity
if in.SignedClaims != nil {
in, out := &in.SignedClaims, &out.SignedClaims
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
} else {
out.SignedClaims = nil
}
if in.Created != nil {
in, out := &in.Created, &out.Created
*out = new(unversioned.Time)
if err := api.Convert_unversioned_Time_To_unversioned_Time(*in, *out, s); err != nil {
return err
}
} else {
out.Created = nil
}
if in.IssuedBy != nil {
in, out := &in.IssuedBy, &out.IssuedBy
*out = new(SignatureIssuer)
if err := Convert_api_SignatureIssuer_To_v1_SignatureIssuer(*in, *out, s); err != nil {
return err
}
} else {
out.IssuedBy = nil
}
if in.IssuedTo != nil {
in, out := &in.IssuedTo, &out.IssuedTo
*out = new(SignatureSubject)
if err := Convert_api_SignatureSubject_To_v1_SignatureSubject(*in, *out, s); err != nil {
return err
}
} else {
out.IssuedTo = nil
}
return nil
}
示例13: autoConvert_api_TagEventCondition_To_v1_TagEventCondition
func autoConvert_api_TagEventCondition_To_v1_TagEventCondition(in *api.TagEventCondition, out *TagEventCondition, s conversion.Scope) error {
out.Type = TagEventConditionType(in.Type)
out.Status = api_v1.ConditionStatus(in.Status)
if err := pkg_api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
return err
}
out.Reason = in.Reason
out.Message = in.Message
out.Generation = in.Generation
return nil
}
示例14: autoConvert_api_TagEvent_To_v1_TagEvent
func autoConvert_api_TagEvent_To_v1_TagEvent(in *image_api.TagEvent, out *TagEvent, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*image_api.TagEvent))(in)
}
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.Created, &out.Created, s); err != nil {
return err
}
out.DockerImageReference = in.DockerImageReference
out.Image = in.Image
out.Generation = in.Generation
return nil
}
示例15: autoConvert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions
func autoConvert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions(in *deploy_api.DeploymentLogOptions, out *DeploymentLogOptions, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*deploy_api.DeploymentLogOptions))(in)
}
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
out.Container = in.Container
out.Follow = in.Follow
out.Previous = in.Previous
if in.SinceSeconds != nil {
in, out := &in.SinceSeconds, &out.SinceSeconds
*out = new(int64)
**out = **in
} else {
out.SinceSeconds = nil
}
if in.SinceTime != nil {
in, out := &in.SinceTime, &out.SinceTime
*out = new(unversioned.Time)
if err := api.Convert_unversioned_Time_To_unversioned_Time(*in, *out, s); err != nil {
return err
}
} else {
out.SinceTime = nil
}
out.Timestamps = in.Timestamps
if in.TailLines != nil {
in, out := &in.TailLines, &out.TailLines
*out = new(int64)
**out = **in
} else {
out.TailLines = nil
}
if in.LimitBytes != nil {
in, out := &in.LimitBytes, &out.LimitBytes
*out = new(int64)
**out = **in
} else {
out.LimitBytes = nil
}
out.NoWait = in.NoWait
if in.Version != nil {
in, out := &in.Version, &out.Version
*out = new(int64)
**out = **in
} else {
out.Version = nil
}
return nil
}