errors

package
v0.0.0-...-0485310 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 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"
	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")
	ErrorDataSourceUnauthorized          = NewDataSourceError("unauthorized")
)
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")
	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")
	ErrorUserUnauthorized          = NewUserError("unauthorized")
	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 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 ErrorStatsInvalidType = NewStatsError("invalid type")

Functions

func NewControllerError

func NewControllerError(msg string) (err error)

func NewDataSourceError

func NewDataSourceError(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 NewProcessError

func NewProcessError(msg string) (err error)

func NewResultError

func NewResultError(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