Documentation ¶
Index ¶
- Constants
- Variables
- func NewControllerError(msg string) (err error)
- func NewDataSourceError(msg string) (err error)
- func NewError(prefix ErrorPrefix, msg string) (err error)
- func NewEventError(msg string) (err error)
- func NewFilterError(msg string) (err error)
- func NewFsError(msg string) (err error)
- func NewGitError(msg string) (err error)
- func NewGrpcError(msg string) (err error)
- func NewHttpError(msg string) (err error)
- func NewInjectError(msg string) (err error)
- func NewModelError(msg string) (err error)
- func NewNodeError(msg string) (err error)
- func NewProcessError(msg string) (err error)
- func NewResultError(msg string) (err error)
- func NewScheduleError(msg string) (err error)
- func NewSpiderError(msg string) (err error)
- func NewStatsError(msg string) (err error)
- func NewTaskError(msg string) (err error)
- func NewUserError(msg string) (err error)
- type ErrorPrefix
Constants ¶
View Source
const ( ErrorPrefixController = "controller" ErrorPrefixModel = "model" ErrorPrefixFilter = "filter" ErrorPrefixHttp = "http" ErrorPrefixGrpc = "grpc" ErrorPrefixNode = "node" ErrorPrefixInject = "inject" ErrorPrefixSpider = "spider" ErrorPrefixFs = "fs" ErrorPrefixTask = "task" ErrorPrefixSchedule = "schedule" ErrorPrefixUser = "user" ErrorPrefixStats = "stats" ErrorPrefixEvent = "event" ErrorPrefixProcess = "process" ErrorPrefixGit = "git" ErrorPrefixResult = "result" ErrorPrefixDataSource = "data_source" )
Variables ¶
View Source
var ( ErrorDataSourceInvalidType = NewDataSourceError("invalid type") ErrorDataSourceNotExists = NewDataSourceError("not exists") ErrorDataSourceNotExistsInContext = NewDataSourceError("not exists in context") ErrorDataSourceAlreadyExists = NewDataSourceError("already exists") ErrorDataSourceMismatch = NewDataSourceError("mismatch") ErrorDataSourceMissingRequiredFields = NewDataSourceError("missing required fields") )
View Source
var ( ErrorGitInvalidAuthType = NewGitError("invalid auth type") ErrorGitNoMainBranch = NewGitError("no main branch") )
View Source
var ( ErrorGrpcClientFailedToStart = NewGrpcError("client failed to start") ErrorGrpcServerFailedToListen = NewGrpcError("server failed to listen") ErrorGrpcServerFailedToServe = NewGrpcError("server failed to serve") ErrorGrpcClientNotExists = NewGrpcError("client not exists") ErrorGrpcClientAlreadyExists = NewGrpcError("client already exists") ErrorGrpcInvalidType = NewGrpcError("invalid type") ErrorGrpcNotAllowed = NewGrpcError("not allowed") ErrorGrpcSubscribeNotExists = NewGrpcError("subscribe not exists") ErrorGrpcStreamNotFound = NewGrpcError("stream not found") ErrorGrpcInvalidCode = NewGrpcError("invalid code") ErrorGrpcInvalidNodeKey = NewGrpcError("invalid node key") )
View Source
var ( ErrorProcessReachedMaxErrors = NewProcessError("reached max errors") ErrorProcessDaemonProcessExited = NewProcessError("daemon process exited") )
View Source
var ( ErrorSpiderMissingRequiredOption = NewSpiderError("missing required option") ErrorSpiderForbidden = NewSpiderError("forbidden") )
View Source
var ( ErrorTaskNotExists = NewTaskError("not exists") ErrorTaskAlreadyExists = NewTaskError("already exists") ErrorTaskInvalidType = NewTaskError("invalid type") ErrorTaskProcessStillExists = NewTaskError("process still exists") ErrorTaskUnableToCancel = NewTaskError("unable to cancel") ErrorTaskForbidden = NewTaskError("forbidden") ErrorTaskNoAvailableRunners = NewTaskError("no available runner") ErrorTaskEmptySpiderId = NewTaskError("empty spider id") ErrorTaskNoNodeId = NewTaskError("no node id") ErrorTaskNodeNotFound = NewTaskError("node not found") ErrorTaskMissingRequiredOption = NewSpiderError("missing required option") )
View Source
var ( ErrorUserInvalidType = NewUserError("invalid type") ErrorUserInvalidToken = NewUserError("invalid token") ErrorUserNotExists = NewUserError("not exists") ErrorUserNotExistsInContext = NewUserError("not exists in context") ErrorUserAlreadyExists = NewUserError("already exists") ErrorUserMismatch = NewUserError("mismatch") ErrorUserMissingRequiredFields = NewUserError("missing required fields") ErrorUserInvalidPassword = NewUserError("invalid password (length must be no less than 5)") )
View Source
var ErrorControllerAddError = NewControllerError("add error")
View Source
var ErrorControllerDeleteError = NewControllerError("delete error")
View Source
var ErrorControllerEmptyResponse = NewControllerError("empty response")
View Source
var ErrorControllerFilerNotFound = NewControllerError("filer not found")
View Source
var ErrorControllerInvalidControllerId = NewControllerError("invalid controller id")
View Source
var ErrorControllerInvalidType = NewControllerError("invalid type")
View Source
var ErrorControllerMissingInCache = NewControllerError("missing in cache")
View Source
var ErrorControllerMissingRequestFields = NewControllerError("missing request fields")
View Source
var ErrorControllerNoModelService = NewControllerError("no model service")
View Source
var ErrorControllerNotCancellable = NewControllerError("not cancellable")
View Source
var ErrorControllerNotImplemented = NewControllerError("not implemented")
View Source
var ErrorControllerRequestPayloadInvalid = NewControllerError("request payload invalid")
View Source
var ErrorControllerUpdateError = NewControllerError("update error")
View Source
var ErrorEventAlreadyExists = NewEventError("already exists")
View Source
var ErrorEventInvalidType = NewEventError("invalid type")
View Source
var ErrorEventNotFound = NewEventError("not found")
View Source
var ErrorEventUnknownAction = NewEventError("unknown action")
View Source
var ErrorFilterInvalidOperation = NewFilterError("invalid operation")
View Source
var ErrorFilterUnableToParseQuery = NewFilterError("unable to parse query")
View Source
var ErrorFsAlreadyExists = NewFsError("already exists")
View Source
var ErrorFsEmptyWorkspacePath = NewFsError("empty workspace path")
View Source
var ErrorFsForbidden = NewFsError("forbidden")
View Source
var ErrorFsInvalidContent = NewFsError("invalid content")
View Source
var ErrorFsInvalidType = NewFsError("invalid type")
View Source
var ErrorHttpBadRequest = NewHttpError("bad request")
View Source
var ErrorHttpNotFound = NewHttpError("not found")
View Source
var ErrorInjectEmptyValue = NewInjectError("empty value")
View Source
var ErrorInjectInvalidType = NewInjectError("invalid type")
View Source
var ErrorInjectNotExists = NewInjectError("not exists")
View Source
var ErrorModelAlreadyExists = NewModelError("already exists")
View Source
var ErrorModelDeleteListError = NewModelError("delete list error")
View Source
var ErrorModelInvalidModelId = NewModelError("invalid model id")
View Source
var ErrorModelInvalidType = NewModelError("invalid type")
View Source
var ErrorModelMissingId = errors.New("missing _id")
View Source
var ErrorModelMissingRequiredData = NewModelError("missing required data")
View Source
var ErrorModelNilPointer = NewModelError("nil pointer")
View Source
var ErrorModelNotAllowed = NewModelError("not allowed")
View Source
var ErrorModelNotExists = NewModelError("not exists")
View Source
var ErrorModelNotFound = NewModelError("not found")
View Source
var ErrorModelNotImplemented = NewModelError("not implemented")
View Source
var ErrorNodeInvalidCode = NewNodeError("invalid code")
View Source
var ErrorNodeInvalidNodeKey = NewNodeError("invalid node key")
View Source
var ErrorNodeInvalidStatus = NewNodeError("invalid status")
View Source
var ErrorNodeInvalidType = NewNodeError("invalid type")
View Source
var ErrorNodeMonitorError = NewNodeError("monitor error")
View Source
var ErrorNodeNotExists = NewNodeError("not exists")
View Source
var ErrorNodeServiceNotExists = NewNodeError("service not exists")
View Source
var ErrorNodeUnregistered = NewNodeError("unregistered")
View Source
var ErrorStatsInvalidType = NewStatsError("invalid type")
Functions ¶
func NewControllerError ¶
func NewDataSourceError ¶
func NewError ¶
func NewError(prefix ErrorPrefix, msg string) (err error)
func NewEventError ¶
func NewFilterError ¶
func NewFsError ¶
func NewGitError ¶
func NewGrpcError ¶
func NewHttpError ¶
func NewInjectError ¶
func NewModelError ¶
func NewNodeError ¶
func NewProcessError ¶
func NewResultError ¶
func NewScheduleError ¶
func NewSpiderError ¶
func NewStatsError ¶
func NewTaskError ¶
func NewUserError ¶
Types ¶
type ErrorPrefix ¶
type ErrorPrefix string
Click to show internal directories.
Click to hide internal directories.