mirror of
https://github.com/paralus/paralus.git
synced 2026-03-05 18:40:18 +00:00
* added test cases and improved coverage * aligned usermgmt project structure * move all proto to rcloud-base common
21 lines
449 B
Go
21 lines
449 B
Go
package server
|
|
|
|
import (
|
|
v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3"
|
|
|
|
"google.golang.org/protobuf/types/known/timestamppb"
|
|
)
|
|
|
|
func getStatus(err error) *v3.Status {
|
|
if err != nil {
|
|
return &v3.Status{
|
|
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
|
LastUpdated: timestamppb.Now(),
|
|
Reason: err.Error(),
|
|
}
|
|
}
|
|
return &v3.Status{
|
|
ConditionStatus: v3.ConditionStatus_StatusOK,
|
|
}
|
|
}
|