Documentation
¶
Index ¶
Constants ¶
View Source
const ( ActionTypeVisit = "visit" ActionTypeInstallDep = "install_dep" ActionTypeInstallLang = "install_lang" ActionTypeViewDisclaimer = "view_disclaimer" )
View Source
const ( AnchorStartStage = "START_STAGE" AnchorStartUrl = "START_URL" AnchorItems = "ITEMS" AnchorParsers = "PARSERS" )
View Source
const ( OwnerTypeAll = "all" OwnerTypeMe = "me" OwnerTypePublic = "public" )
View Source
const ( ChallengeLogin7d = "login_7d" ChallengeLogin30d = "login_30d" ChallengeLogin90d = "login_90d" ChallengeLogin180d = "login_180d" ChallengeCreateCustomizedSpider = "create_customized_spider" ChallengeCreateConfigurableSpider = "create_configurable_spider" ChallengeCreateSchedule = "create_schedule" ChallengeCreateNodes = "create_nodes" ChallengeCreateUser = "create_user" ChallengeRunRandom = "run_random" ChallengeScrape1k = "scrape_1k" ChallengeScrape10k = "scrape_10k" ChallengeScrape100k = "scrape_100k" ChallengeInstallDep = "install_dep" ChallengeInstallLang = "install_lang" ChallengeViewDisclaimer = "view_disclaimer" )
View Source
const ( ChannelAllNode = "nodes:public" ChannelWorkerNode = "nodes:" ChannelMasterNode = "nodes:master" )
View Source
const ( ASCENDING = "ascending" DESCENDING = "descending" )
View Source
const ( EngineScrapy = "scrapy" EngineColly = "colly" )
View Source
const ( MsgTypeGetLog = "get-log" MsgTypeGetSystemInfo = "get-sys-info" MsgTypeCancelTask = "cancel-task" MsgTypeRemoveLog = "remove-log" MsgTypeRemoveSpider = "remove-spider" )
View Source
const ( ObjectIdNull = "000000000000000000000000" Infinite = 999999999 )
View Source
const ( StatusOnline = "online" StatusOffline = "offline" )
View Source
const ( NotificationTriggerOnTaskEnd = "notification_trigger_on_task_end" NotificationTriggerOnTaskError = "notification_trigger_on_task_error" NotificationTriggerNever = "notification_trigger_never" )
View Source
const ( NotificationTypeMail = "notification_type_mail" NotificationTypeDingTalk = "notification_type_ding_talk" NotificationTypeWechat = "notification_type_wechat" )
View Source
const ( RegisterTypeMac = "mac" RegisterTypeIp = "ip" RegisterTypeHostname = "hostname" RegisterTypeCustomName = "customName" )
View Source
const ( RpcInstallLang = "install_lang" RpcInstallDep = "install_dep" RpcUninstallDep = "uninstall_dep" RpcGetInstalledDepList = "get_installed_dep_list" RpcGetLang = "get_lang" RpcCancelTask = "cancel_task" RpcGetSystemInfoService = "get_system_info" RpcRemoveSpider = "remove_spider" )
View Source
const ( ScheduleStatusStop = "stopped" ScheduleStatusRunning = "running" ScheduleStatusError = "error" ScheduleStatusErrorNotFoundNode = "Not Found Node" ScheduleStatusErrorNotFoundSpider = "Not Found Spider" )
View Source
const ( Customized = "customized" Configurable = "configurable" Plugin = "plugin" )
View Source
const ( Windows = "windows" Linux = "linux" Darwin = "darwin" )
View Source
const ( Python = "python" Nodejs = "node" Java = "java" )
View Source
const ( InstallStatusNotInstalled = "not-installed" InstallStatusInstalling = "installing" InstallStatusInstallingOther = "installing-other" InstallStatusInstalled = "installed" )
View Source
const ( LangTypeLang = "lang" LangTypeWebDriver = "webdriver" )
View Source
const ( // 调度中 StatusPending string = "pending" // 运行中 StatusRunning string = "running" // 已完成 StatusFinished string = "finished" // 错误 StatusError string = "error" // 取消 StatusCancelled string = "cancelled" // 节点重启导致的异常终止 StatusAbnormal string = "abnormal" )
View Source
const ( TaskFinish string = "finish" TaskCancel string = "cancel" )
View Source
const ( RunTypeAllNodes string = "all-nodes" RunTypeRandom string = "random" RunTypeSelectedNodes string = "selected-nodes" )
View Source
const ( TaskTypeSpider string = "spider" TaskTypeSystem string = "system" )
View Source
const ( RoleAdmin = "admin" RoleNormal = "normal" )
View Source
const ( String = "string" Number = "number" Boolean = "boolean" Array = "array" Object = "object" )
View Source
const (
ContextUser = "currentUser"
)
View Source
const (
ErrorRegexPattern = "(?:[ :,.]|^)((?:error|exception|traceback)s?)(?:[ :,.]|$)"
)
View Source
const ScrapyProtectedFieldNames = "_id,task_id,ts"
View Source
const ScrapyProtectedStageNames = ""
Variables ¶
View Source
var ( ErrorMongoError = errors.NewSystemOPError(1001, "system error:[mongo]%s", http.StatusInternalServerError) //users ErrorUserNotFound = errors.NewBusinessError(10001, "user not found.", http.StatusUnauthorized) ErrorUsernameOrPasswordInvalid = errors.NewBusinessError(11001, "username or password invalid", http.StatusUnauthorized) )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.