Versions in this module Expand all Collapse all v1 v1.0.7 Aug 2, 2022 v1.0.6 Jul 31, 2022 v1.0.5 Jul 20, 2022 v1.0.4 Jul 6, 2022 v1.0.3 Jul 5, 2022 v1.0.2 Mar 8, 2022 v1.0.1 Mar 7, 2022 Changes in this version + var ModelRelations = []modelRelation + func GetExecutables() (executables []entity.Executable, err error) + func GetLocalSystemInfo() (sysInfo entity.SystemInfo, err error) + func GetModelColName(id interfaces.ModelId) (colName string) + func GetPathValues() (paths []string) + func GetSystemEnv(key string) string + type Artifact struct + Col string + Del bool + Id primitive.ObjectID + Obj interface{} + Sys *ArtifactSys + TagIds []primitive.ObjectID + func (a *Artifact) GetId() (id primitive.ObjectID) + func (a *Artifact) GetSys() (sys interfaces.ModelArtifactSys) + func (a *Artifact) GetTagIds() (ids []primitive.ObjectID) + func (a *Artifact) SetDel(del bool) + func (a *Artifact) SetId(id primitive.ObjectID) + func (a *Artifact) SetObj(obj interfaces.Model) + func (a *Artifact) SetTagIds(ids []primitive.ObjectID) + type ArtifactSys struct + CreateTs time.Time + CreateUid primitive.ObjectID + DeleteTs time.Time + DeleteUid primitive.ObjectID + UpdateTs time.Time + UpdateUid primitive.ObjectID + func (sys *ArtifactSys) GetCreateTs() time.Time + func (sys *ArtifactSys) GetCreateUid() primitive.ObjectID + func (sys *ArtifactSys) GetDeleteTs() time.Time + func (sys *ArtifactSys) GetDeleteUid() primitive.ObjectID + func (sys *ArtifactSys) GetUpdateTs() time.Time + func (sys *ArtifactSys) GetUpdateUid() primitive.ObjectID + func (sys *ArtifactSys) SetCreateTs(ts time.Time) + func (sys *ArtifactSys) SetCreateUid(id primitive.ObjectID) + func (sys *ArtifactSys) SetDeleteTs(ts time.Time) + func (sys *ArtifactSys) SetDeleteUid(id primitive.ObjectID) + func (sys *ArtifactSys) SetUpdateTs(ts time.Time) + func (sys *ArtifactSys) SetUpdateUid(id primitive.ObjectID) + type BaseModel struct + Id primitive.ObjectID + Tags []Tag + func (d *BaseModel) GetId() (id primitive.ObjectID) + type DataCollection struct + Id primitive.ObjectID + Name string + func (dc *DataCollection) GetId() (id primitive.ObjectID) + func (dc *DataCollection) SetId(id primitive.ObjectID) + type DataField struct + Id primitive.ObjectID + Key string + Name string + type DataSource struct + Id primitive.ObjectID + Name string + func (ds *DataSource) GetId() (id primitive.ObjectID) + func (ds *DataSource) SetId(id primitive.ObjectID) + type Env struct + Name string + Value string + type ExtraValue struct + Id primitive.ObjectID + Model string + ObjectId primitive.ObjectID + Type string + Value interface{} + func (ev *ExtraValue) GetId() (id primitive.ObjectID) + func (ev *ExtraValue) GetModel() (m string) + func (ev *ExtraValue) GetObjectId() (oid primitive.ObjectID) + func (ev *ExtraValue) GetType() (t string) + func (ev *ExtraValue) GetValue() (v interface{}) + func (ev *ExtraValue) SetId(id primitive.ObjectID) + func (ev *ExtraValue) SetModel(m string) + func (ev *ExtraValue) SetObjectId(oid primitive.ObjectID) + func (ev *ExtraValue) SetType(t string) + func (ev *ExtraValue) SetValue(v interface{}) + type Git struct + AuthType string + Id primitive.ObjectID + Password string + Url string + Username string + func (t *Git) GetId() (id primitive.ObjectID) + func (t *Git) SetId(id primitive.ObjectID) + type Job struct + Id primitive.ObjectID + TaskId primitive.ObjectID + func (j *Job) GetId() (id primitive.ObjectID) + func (j *Job) SetId(id primitive.ObjectID) + type ModelListMap struct + Artifacts []Artifact + DataCollections []DataCollection + DataSources []DataSource + ExtraValues []ExtraValue + Gits []Git + Jobs []Job + Nodes []Node + Passwords []Password + PluginStatus []PluginStatus + Plugins []Plugin + Projects []Project + Results []Result + Schedules []Schedule + Settings []Setting + SpiderStats []SpiderStat + Spiders []Spider + Tags []Tag + TaskQueueItems []TaskQueueItem + TaskStats []TaskStat + Tasks []Task + Tokens []Token + Users []User + Variables []Variable + func NewModelListMap() (m *ModelListMap) + type ModelMap struct + Artifact Artifact + DataCollection DataCollection + DataSource DataSource + ExtraValue ExtraValue + Git Git + Job Job + Node Node + Password Password + Plugin Plugin + PluginStatus PluginStatus + Project Project + Result Result + Schedule Schedule + Setting Setting + Spider Spider + SpiderStat SpiderStat + Tag Tag + Task Task + TaskQueueItem TaskQueueItem + TaskStat TaskStat + Token Token + User User + Variable Variable + func NewModelMap() (m *ModelMap) + type Node struct + Active bool + ActiveTs time.Time + AvailableRunners int + Description string + Enabled bool + Hostname string + Id primitive.ObjectID + Ip string + IsMaster bool + Key string + Mac string + MaxRunners int + Name string + Port string + Status string + Tags []Tag + func (n *Node) DecrementAvailableRunners() + func (n *Node) GetActive() (active bool) + func (n *Node) GetAvailableRunners() (runners int) + func (n *Node) GetEnabled() (enabled bool) + func (n *Node) GetId() (id primitive.ObjectID) + func (n *Node) GetIsMaster() (ok bool) + func (n *Node) GetKey() (key string) + func (n *Node) GetMaxRunners() (runners int) + func (n *Node) GetName() (name string) + func (n *Node) GetStatus() (status string) + func (n *Node) GetTags() (tags []interfaces.Tag) + func (n *Node) IncrementAvailableRunners() + func (n *Node) SetActive(active bool) + func (n *Node) SetActiveTs(activeTs time.Time) + func (n *Node) SetAvailableRunners(runners int) + func (n *Node) SetEnabled(enabled bool) + func (n *Node) SetId(id primitive.ObjectID) + func (n *Node) SetMaxRunners(runners int) + func (n *Node) SetStatus(status string) + func (n *Node) SetTags(tags []interfaces.Tag) + type Password struct + Id primitive.ObjectID + Password string + func (p *Password) GetId() (id primitive.ObjectID) + func (p *Password) SetId(id primitive.ObjectID) + type Plugin struct + Active bool + AutoStart bool + Cmd string + DeployMode string + Description string + Endpoint string + EventKey entity.PluginEventKey + FullName string + Id primitive.ObjectID + InstallType string + InstallUrl string + LangUrl string + Name string + Proto string + Status []PluginStatus + UIAssets []entity.PluginUIAsset + UIComponents []entity.PluginUIComponent + UISidebarNavs []entity.PluginUINav + func (p *Plugin) GetFullName() (fullName string) + func (p *Plugin) GetId() (id primitive.ObjectID) + func (p *Plugin) GetInstallType() (t string) + func (p *Plugin) GetInstallUrl() (url string) + func (p *Plugin) GetName() (name string) + func (p *Plugin) SetFullName(fullName string) + func (p *Plugin) SetId(id primitive.ObjectID) + func (p *Plugin) SetInstallType(t string) + func (p *Plugin) SetInstallUrl(url string) + func (p *Plugin) SetName(name string) + type PluginStatus struct + Error string + Id primitive.ObjectID + Node *Node + NodeId primitive.ObjectID + Pid int + PluginId primitive.ObjectID + Status string + func (ps *PluginStatus) GetError() (e string) + func (ps *PluginStatus) GetId() (id primitive.ObjectID) + func (ps *PluginStatus) GetNodeId() (id primitive.ObjectID) + func (ps *PluginStatus) GetPid() (pid int) + func (ps *PluginStatus) GetPluginId() (id primitive.ObjectID) + func (ps *PluginStatus) GetStatus() (status string) + func (ps *PluginStatus) SetError(e string) + func (ps *PluginStatus) SetId(id primitive.ObjectID) + func (ps *PluginStatus) SetNodeId(id primitive.ObjectID) + func (ps *PluginStatus) SetPid(pid int) + func (ps *PluginStatus) SetPluginId(id primitive.ObjectID) + func (ps *PluginStatus) SetStatus(status string) + type Project struct + Description string + Id primitive.ObjectID + Name string + Spiders int + Tags []Tag + func (p *Project) GetId() (id primitive.ObjectID) + func (p *Project) GetTags() (tags []interfaces.Tag) + func (p *Project) SetId(id primitive.ObjectID) + func (p *Project) SetTags(tags []interfaces.Tag) + type Result bson.M + func (r *Result) GetId() (id primitive.ObjectID) + func (r *Result) GetTaskId() (id primitive.ObjectID) + func (r *Result) GetValue(key string) (value interface{}) + func (r *Result) SetId(id primitive.ObjectID) + func (r *Result) SetTaskId(id primitive.ObjectID) + func (r *Result) SetValue(key string, value interface{}) + func (r *Result) Value() map[string]interface{} + type Schedule struct + Cmd string + Cron string + Description string + Enabled bool + EntryId cron.EntryID + Id primitive.ObjectID + Mode string + Name string + NodeIds []primitive.ObjectID + NodeTags []string + Param string + Priority int + ScrapyLogLevel string + ScrapySpider string + SpiderId primitive.ObjectID + Tags []string + UserId primitive.ObjectID + func (s *Schedule) GetCmd() (cmd string) + func (s *Schedule) GetCron() (c string) + func (s *Schedule) GetEnabled() (enabled bool) + func (s *Schedule) GetEntryId() (id cron.EntryID) + func (s *Schedule) GetId() (id primitive.ObjectID) + func (s *Schedule) GetMode() (mode string) + func (s *Schedule) GetNodeIds() (ids []primitive.ObjectID) + func (s *Schedule) GetNodeTags() (tags []string) + func (s *Schedule) GetParam() (param string) + func (s *Schedule) GetPriority() (p int) + func (s *Schedule) GetSpiderId() (id primitive.ObjectID) + func (s *Schedule) SetCmd(cmd string) + func (s *Schedule) SetCron(c string) + func (s *Schedule) SetEnabled(enabled bool) + func (s *Schedule) SetEntryId(id cron.EntryID) + func (s *Schedule) SetId(id primitive.ObjectID) + func (s *Schedule) SetMode(mode string) + func (s *Schedule) SetNodeIds(ids []primitive.ObjectID) + func (s *Schedule) SetNodeTags(tags []string) + func (s *Schedule) SetParam(param string) + func (s *Schedule) SetPriority(p int) + func (s *Schedule) SetSpiderId(id primitive.ObjectID) + type Setting struct + Id primitive.ObjectID + Key string + Value bson.M + func (s *Setting) GetId() (id primitive.ObjectID) + func (s *Setting) SetId(id primitive.ObjectID) + type Spider struct + Cmd string + ColId primitive.ObjectID + ColName string + DedupField string + DedupMethod string + Description string + Envs []Env + GitAutoSync bool + GitBranch string + GitHasCredential bool + GitId primitive.ObjectID + GitPassword string + GitSyncError string + GitSyncFrequency string + GitUrl string + GitUsername string + Id primitive.ObjectID + IsDedup bool + IsGit bool + IsLongTask bool + IsPublic bool + IsScrapy bool + IsWebHook bool + Mode string + Name string + NodeIds []primitive.ObjectID + NodeTags []string + Param string + Priority int + ProjectId primitive.ObjectID + SpiderNames []string + Stat *SpiderStat + Tags []Tag + Template string + Type string + WebHookUrl string + func (s *Spider) GetCmd() (cmd string) + func (s *Spider) GetId() (id primitive.ObjectID) + func (s *Spider) GetMode() (mode string) + func (s *Spider) GetName() (n string) + func (s *Spider) GetNodeIds() (ids []primitive.ObjectID) + func (s *Spider) GetNodeTags() (tags []string) + func (s *Spider) GetParam() (param string) + func (s *Spider) GetPriority() (p int) + func (s *Spider) GetTags() (tags []interfaces.Tag) + func (s *Spider) GetType() (ty string) + func (s *Spider) SetCmd(cmd string) + func (s *Spider) SetId(id primitive.ObjectID) + func (s *Spider) SetMode(mode string) + func (s *Spider) SetNodeIds(ids []primitive.ObjectID) + func (s *Spider) SetNodeTags(tags []string) + func (s *Spider) SetParam(param string) + func (s *Spider) SetPriority(p int) + func (s *Spider) SetTags(tags []interfaces.Tag) + type SpiderStat struct + AverageRuntimeDuration int64 + AverageTotalDuration int64 + AverageWaitDuration int64 + Id primitive.ObjectID + LastTask *Task + LastTaskId primitive.ObjectID + Results int + RuntimeDuration int64 + Tasks int + TotalDuration int64 + WaitDuration int64 + func (s *SpiderStat) GetId() (id primitive.ObjectID) + func (s *SpiderStat) SetId(id primitive.ObjectID) + type Tag struct + Col string + Color string + Description string + Id primitive.ObjectID + Name string + func (t *Tag) GetColor() (res string) + func (t *Tag) GetId() (id primitive.ObjectID) + func (t *Tag) GetName() (res string) + func (t *Tag) SetCol(col string) + func (t *Tag) SetId(id primitive.ObjectID) + type Task struct + Cmd string + Error string + HasSub bool + Id primitive.ObjectID + Mode string + NodeId primitive.ObjectID + NodeIds []primitive.ObjectID + NodeTags []string + Param string + ParentId primitive.ObjectID + Pid int + Priority int + ScheduleId primitive.ObjectID + SpiderId primitive.ObjectID + Stat *TaskStat + Status string + SubTasks []Task + Type string + UserId primitive.ObjectID + func (t *Task) GetCmd() (cmd string) + func (t *Task) GetError() (error string) + func (t *Task) GetId() (id primitive.ObjectID) + func (t *Task) GetNodeId() (id primitive.ObjectID) + func (t *Task) GetNodeIds() (ids []primitive.ObjectID) + func (t *Task) GetNodeTags() (nodeTags []string) + func (t *Task) GetParam() (param string) + func (t *Task) GetPriority() (p int) + func (t *Task) GetSpiderId() (id primitive.ObjectID) + func (t *Task) GetStatus() (status string) + func (t *Task) GetType() (ty string) + func (t *Task) GetUserId() (id primitive.ObjectID) + func (t *Task) SetError(error string) + func (t *Task) SetId(id primitive.ObjectID) + func (t *Task) SetNodeId(id primitive.ObjectID) + func (t *Task) SetStatus(status string) + func (t *Task) SetUserId(id primitive.ObjectID) + type TaskDailyItem struct + AvgRuntimeDuration float64 + Date string + TaskCount int + type TaskQueueItem struct + Id primitive.ObjectID + Priority int + func (t *TaskQueueItem) GetId() (id primitive.ObjectID) + func (t *TaskQueueItem) SetId(id primitive.ObjectID) + type TaskStat struct + CreateTs time.Time + EndTs time.Time + ErrorLogCount int64 + Id primitive.ObjectID + ResultCount int64 + RuntimeDuration int64 + StartTs time.Time + TotalDuration int64 + WaitDuration int64 + func (s *TaskStat) GetCreateTs() (ts time.Time) + func (s *TaskStat) GetEndTs() (ts time.Time) + func (s *TaskStat) GetErrorLogCount() (c int64) + func (s *TaskStat) GetId() (id primitive.ObjectID) + func (s *TaskStat) GetResultCount() (c int64) + func (s *TaskStat) GetRuntimeDuration() (d int64) + func (s *TaskStat) GetStartTs() (ts time.Time) + func (s *TaskStat) GetTotalDuration() (d int64) + func (s *TaskStat) GetWaitDuration() (d int64) + func (s *TaskStat) SetCreateTs(ts time.Time) + func (s *TaskStat) SetEndTs(ts time.Time) + func (s *TaskStat) SetErrorLogCount(c int64) + func (s *TaskStat) SetId(id primitive.ObjectID) + func (s *TaskStat) SetResultCount(c int64) + func (s *TaskStat) SetRuntimeDuration(d int64) + func (s *TaskStat) SetStartTs(ts time.Time) + func (s *TaskStat) SetTotalDuration(d int64) + func (s *TaskStat) SetWaitDuration(d int64) + type Token struct + Id primitive.ObjectID + Name string + Token string + func (t *Token) GetId() (id primitive.ObjectID) + func (t *Token) SetId(id primitive.ObjectID) + type User struct + Email string + Id primitive.ObjectID + Name string + Password string + Role string + Username string + func (u *User) GetEmail() (email string) + func (u *User) GetId() (id primitive.ObjectID) + func (u *User) GetPassword() (p string) + func (u *User) GetRole() (r string) + func (u *User) GetUsername() (name string) + func (u *User) SetId(id primitive.ObjectID) + type Variable struct + Id primitive.ObjectID + Key string + Remark string + Value string + func (v *Variable) GetId() (id primitive.ObjectID) + func (v *Variable) SetId(id primitive.ObjectID)