configui/errors.go

38 lines
717 B
Go
Raw Normal View History

2021-11-12 09:25:44 +00:00
package configui
import (
"net/http"
"kumoly.io/lib/ksrv"
)
var ErrorOniHasNoPID = ksrv.Error{
Code: http.StatusBadRequest,
ID: "ErrorOniHasNoPID",
Message: "oni has no pid",
}
var ErrorOniNotStarted = ksrv.Error{
Code: http.StatusConflict,
ID: "ErrorOniNotStarted",
Message: "oni hasn't start",
}
var ErrorOniHasStarted = ksrv.Error{
Code: http.StatusConflict,
ID: "ErrorOniHasStarted",
Message: "oni has started",
}
var ErrorOniNotFound = ksrv.Error{
Code: http.StatusNotFound,
ID: "ErrorOniNotFound",
Message: "oni not found",
}
var ErrorOniNotValid = ksrv.Error{
Code: http.StatusBadRequest,
ID: "ErrorOniNotValid",
Message: "oni no name or cmd",
}