configui/errors.go

56 lines
1.1 KiB
Go
Raw Normal View History

2021-11-12 09:25:44 +00:00
package configui
import (
"net/http"
"kumoly.io/lib/ksrv"
)
2021-11-13 04:59:08 +00:00
var ErrorServerReloading = ksrv.Error{
Code: http.StatusServiceUnavailable,
ID: "ErrorServerReloading",
Message: "server is reloading",
}
2021-11-12 09:25:44 +00:00
var ErrorOniHasNoPID = ksrv.Error{
Code: http.StatusBadRequest,
ID: "ErrorOniHasNoPID",
Message: "oni has no pid",
}
var ErrorOniNotStarted = ksrv.Error{
2021-11-12 15:09:32 +00:00
Code: http.StatusConflict,
ID: "ErrorOniNotStarted",
Tmpl: "%s hasn't start",
2021-11-12 09:25:44 +00:00
}
var ErrorOniHasStarted = ksrv.Error{
2021-11-13 04:59:08 +00:00
Code: http.StatusConflict,
ID: "ErrorOniHasStarted",
Tmpl: "%s has started",
2021-11-12 09:25:44 +00:00
}
var ErrorOniNotFound = ksrv.Error{
2021-11-12 15:09:32 +00:00
Code: http.StatusNotFound,
ID: "ErrorOniNotFound",
Tmpl: "%s not found",
2021-11-12 09:25:44 +00:00
}
var ErrorOniNotValid = ksrv.Error{
Code: http.StatusBadRequest,
ID: "ErrorOniNotValid",
Message: "oni no name or cmd",
}
2021-11-13 04:59:08 +00:00
var ErrorNoDeleteRunning = ksrv.Error{
Code: http.StatusBadRequest,
ID: "ErrorNoDeleteRunning",
Tmpl: "cannot delete running: %s",
}
var ErrorOniNoLog = ksrv.Error{
Code: http.StatusNotFound,
ID: "ErrorOniNoLog",
Tmpl: "%s has no logs",
}