crawl

package
v0.0.0-...-55a90a5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCrawler

func RunCrawler(db *gorm.DB)

func RunStats

func RunStats(site site.Site, crawl Crawl, db *gorm.DB, wg *sync.WaitGroup, maxPool chan struct{})

Types

type Crawl

type Crawl struct {
	gorm.Model
	StartDate time.Time   `json:"startDate"`
	Stats     []Stats     `gorm:"foreignKey:CrawlerRefer" json:"stats"`
	Sites     []site.Site `gorm:"foreignKey:CrawlerRefer" json:"sites"`
}

type Stats

type Stats struct {
	gorm.Model   `json:"-"`
	CrawlerRefer uint                      `json:"-"`
	SiteRefer    uint                      `json:"-"`
	Site         site.Site                 `gorm:"foreignKey:SiteRefer" json:"site"`
	Compression  compression.Compression   `json:"compression"`
	IPVersion    ipversion.IPVersion       `json:"ip_version"`
	Protocol     protocol.Protocol         `json:"protocol"`
	SSG          staticgenerator.Generator `json:"ssg"`
	Images       []image.Image             `gorm:"foreignKey:StatRefer" json:"images"`
}

Jump to

Keyboard shortcuts

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