errors

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

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"
	ErrorPrefixPlugin     = "plugin"
	ErrorPrefixProcess    = "process"
	ErrorPrefixGit        = "git"
)

Variables

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")
	ErrorGrpcUnauthorized         = NewGrpcError("unauthorized")
)
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")
)
View Source
var (
	ErrorUserInvalidType           = NewUserError("invalid type")
	ErrorUserInvalidToken          = NewUserError("invalid token")
	ErrorUserNotExists             = NewUserError("not exists")
	ErrorUserAlreadyExists         = NewUserError("already exists")
	ErrorUserMismatch              = NewUserError("mismatch")
	ErrorUserMissingRequiredFields = NewUserError("missing required fields")
	ErrorUserUnauthorized          = NewUserError("unauthorized")
	ErrorUserNotExistsInContext    = NewUserError("not exists in context")
	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 ErrorFsInvalidType = NewFsError("invalid type")
View Source
var ErrorHttpBadRequest = NewHttpError("bad request")
View Source
var ErrorHttpNotFound = NewHttpError("not found")
View Source
var ErrorHttpUnauthorized = NewHttpError("unauthorized")
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 ErrorPluginForbidden = NewPluginError("forbidden")
View Source
var ErrorPluginInvalidType = NewPluginError("invalid type")
View Source
var ErrorPluginMissingProcess = NewPluginError("missing process")
View Source
var ErrorPluginMissingRequiredOption = NewPluginError("missing required option")
View Source
var ErrorPluginNotExists = NewPluginError("not exists")
View Source
var ErrorPluginNotImplemented = NewPluginError("not implemented")
View Source
var ErrorPluginPathNotExists = NewPluginError("path not exists")
View Source
var ErrorPluginPluginJsonNotExists = NewPluginError("plugin.json not exists")
View Source
var ErrorStatsInvalidType = NewStatsError("invalid type")

Functions

func NewControllerError

func NewControllerError(msg string) (err error)

func NewError

func NewError(prefix ErrorPrefix, msg string) (err error)

func NewEventError

func NewEventError(msg string) (err error)

func NewFilterError

func NewFilterError(msg string) (err error)

func NewFsError

func NewFsError(msg string) (err error)

func NewGitError

func NewGitError(msg string) (err error)

func NewGrpcError

func NewGrpcError(msg string) (err error)

func NewHttpError

func NewHttpError(msg string) (err error)

func NewInjectError

func NewInjectError(msg string) (err error)

func NewModelError

func NewModelError(msg string) (err error)

func NewNodeError

func NewNodeError(msg string) (err error)

func NewPluginError

func NewPluginError(msg string) (err error)

func NewProcessError

func NewProcessError(msg string) (err error)

func NewScheduleError

func NewScheduleError(msg string) (err error)

func NewSpiderError

func NewSpiderError(msg string) (err error)

func NewStatsError

func NewStatsError(msg string) (err error)

func NewTaskError

func NewTaskError(msg string) (err error)

func NewUserError

func NewUserError(msg string) (err error)

Types

type ErrorPrefix

type ErrorPrefix string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL