Port most of the HTTP code over to gin
This commit is contained in:
12
server/power.go
Normal file
12
server/power.go
Normal file
@@ -0,0 +1,12 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user