wings/server/power.go

13 lines
225 B
Go
Raw Normal View History

2020-04-06 01:00:33 +00:00
package server
type PowerAction struct {
Action string `json:"action"`
}
func (pr *PowerAction) IsValid() bool {
return pr.Action == "start" ||
pr.Action == "stop" ||
pr.Action == "kill" ||
pr.Action == "restart"
}