You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
417 B
29 lines
417 B
package models
|
|
|
|
type Status int
|
|
|
|
func (s Status) Valid() bool {
|
|
return s >= 0 && s < maxStatus
|
|
}
|
|
|
|
const (
|
|
Blocked Status = iota
|
|
Available
|
|
Background
|
|
Active
|
|
Completed
|
|
Failed
|
|
Dropped
|
|
|
|
maxStatus
|
|
)
|
|
|
|
var StatusLabels = map[Status]string{
|
|
Blocked: "Blocked",
|
|
Available: "Available",
|
|
Background: "Background",
|
|
Active: "Active",
|
|
Completed: "Completed",
|
|
Failed: "Failed",
|
|
Dropped: "Dropped",
|
|
}
|