robot-control-manager/modules/utils/globals.go

43 lines
930 B
Go

package utils
const (
RobotPingRetries = 3
RobotPingHandlerInterval = 5 // seconds
RobotsPageLimit = 10
UnauthorizedRobotsPageLimit = 10
minRobotNameLength = "2"
maxRobotNameLength = "30"
)
const (
RobotStatusIdle = 1
RobotStatusRunning = 2
RobotStatusConnecting = 3
RobotStatusError = 4
RobotStatusOffline = 5
)
const (
RobotTypeRex = 1
RobotTypeYeet = 2
)
const (
SSESentCmdUpdateRobotStatus = 1
SSESentCmdAddUnauthorizedRobot = 2
SSESentCmdAddRobot = 3
SSESentCmdRemoveUnauthorizedRobot = 4
SSESentCmdRemoveRobot = 5
SSESentCmdRobotUpdated = 6
SSESentCmdUpdateRobotCurrentJob = 7
SSESentCmdUpdateRobotJobsWaitingCount = 8
)
var (
generalRules = map[string]string{
"Name": "required,min=" + minRobotNameLength + ",max=" + maxRobotNameLength,
"Type": "required,numeric",
}
)