Documentation
¶
Index ¶
- Variables
- func DeleteNode(c *gin.Context)
- func DeleteSchedule(c *gin.Context)
- func DeleteSpider(c *gin.Context)
- func DeleteTask(c *gin.Context)
- func DownloadTaskResultsCsv(c *gin.Context)
- func GetHomeStats(c *gin.Context)
- func GetNode(c *gin.Context)
- func GetNodeList(c *gin.Context)
- func GetNodeTaskList(c *gin.Context)
- func GetSchedule(c *gin.Context)
- func GetScheduleList(c *gin.Context)
- func GetSpider(c *gin.Context)
- func GetSpiderDir(c *gin.Context)
- func GetSpiderList(c *gin.Context)
- func GetSpiderTasks(c *gin.Context)
- func GetSystemInfo(c *gin.Context)
- func GetTask(c *gin.Context)
- func GetTaskList(c *gin.Context)
- func GetTaskResults(c *gin.Context)
- func HandleError(statusCode int, c *gin.Context, err error)
- func HandleErrorF(statusCode int, c *gin.Context, err string)
- func Ping(c *gin.Context)
- func PostNode(c *gin.Context)
- func PostSchedule(c *gin.Context)
- func PostSpider(c *gin.Context)
- func PutSchedule(c *gin.Context)
- func PutTask(c *gin.Context)
- type File
- type ListResponse
- type Response
- type TaskListRequestData
- type TaskResultsRequestData
Constants ¶
This section is empty.
Variables ¶
View Source
var NodeIdss = []bson.ObjectId{bson.ObjectIdHex("5d429e6c19f7abede924fee2"), bson.ObjectIdHex("5d429e6c19f7abede924fee1")}
View Source
var NodeList = []model.Node{ { Id: bson.ObjectId("5d429e6c19f7abede924fee2"), Ip: "10.32.35.15", Name: "test1", Status: "online", Port: "8081", Mac: "ac:12:df:12:fd", Description: "For test1", IsMaster: true, UpdateTs: time.Now(), CreateTs: time.Now(), UpdateTsUnix: time.Now().Unix(), }, { Id: bson.ObjectId("5d429e6c19f7abede924fe22"), Ip: "10.32.35.12", Name: "test2", Status: "online", Port: "8082", Mac: "ac:12:df:12:vh", Description: "For test2", IsMaster: true, UpdateTs: time.Now(), CreateTs: time.Now(), UpdateTsUnix: time.Now().Unix(), }, }
View Source
var SpiderList = []model.Spider{ { Id: bson.ObjectId("5d429e6c19f7abede924fee2"), Name: "For test", DisplayName: "test", Type: "test", Col: "test", Site: "www.baidu.com", Envs: nil, Src: "../app/spiders", Cmd: "scrapy crawl test", LastRunTs: time.Now(), CreateTs: time.Now(), UpdateTs: time.Now(), UserId: constants.ObjectIdNull, }, }
View Source
var TaskList = []model.Task{ { Id: "1234", SpiderId: bson.ObjectId("5d429e6c19f7abede924fee2"), StartTs: time.Now(), FinishTs: time.Now(), Status: "进行中", NodeId: bson.ObjectId("5d429e6c19f7abede924fee2"), LogPath: "./log", Cmd: "scrapy crawl test", Error: "", ResultCount: 0, WaitDuration: 10.0, RuntimeDuration: 10, TotalDuration: 20, SpiderName: "test", NodeName: "test", CreateTs: time.Now(), UpdateTs: time.Now(), }, { Id: "5678", SpiderId: bson.ObjectId("5d429e6c19f7abede924fee2"), StartTs: time.Now(), FinishTs: time.Now(), Status: "进行中", NodeId: bson.ObjectId("5d429e6c19f7abede924fee2"), LogPath: "./log", Cmd: "scrapy crawl test2", Error: "", ResultCount: 0, WaitDuration: 10.0, RuntimeDuration: 10, TotalDuration: 20, SpiderName: "test", NodeName: "test", CreateTs: time.Now(), UpdateTs: time.Now(), }, }
Functions ¶
func DeleteNode ¶
func DeleteSchedule ¶
func DeleteSpider ¶
func DeleteTask ¶
func DownloadTaskResultsCsv ¶
func GetHomeStats ¶
func GetNodeList ¶
func GetNodeTaskList ¶
func GetSchedule ¶
func GetScheduleList ¶
func GetSpiderDir ¶
func GetSpiderList ¶
func GetSpiderTasks ¶
func GetSystemInfo ¶
func GetTaskList ¶
func GetTaskResults ¶
func PostSchedule ¶
func PostSpider ¶
func PutSchedule ¶
Types ¶
type ListResponse ¶
type TaskListRequestData ¶
type TaskResultsRequestData ¶
Click to show internal directories.
Click to hide internal directories.