models

package
v0.0.0-...-d7ee311 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AltCount

type AltCount struct {
	Alt    int
	NonAlt int
}

type Audio

type Audio struct {
	Origin string
	Audio  string
}

type BasicAuth

type BasicAuth struct {
	AuthUser string
	AuthPass string
}

type CanonicalCount

type CanonicalCount struct {
	Canonical    int
	NonCanonical int
}

type Chart

type Chart []ChartItem

type ChartItem

type ChartItem struct {
	Key   string
	Value int
}

type CountItem

type CountItem struct {
	Key   string
	Value int
}

type CountList

type CountList []CountItem

func (CountList) Len

func (c CountList) Len() int

func (CountList) Less

func (c CountList) Less(i, j int) bool

func (CountList) Swap

func (c CountList) Swap(i, j int)

type Crawl

type Crawl struct {
	Id        int64
	ProjectId int64
	Crawling  bool

	URL                   string
	Start                 time.Time
	End                   time.Time
	TotalIssues           int
	TotalURLs             int
	IssuesEnd             time.Time
	CriticalIssues        int
	AlertIssues           int
	WarningIssues         int
	BlockedByRobotstxt    int // URLs blocked by robots.txt
	Noindex               int // URLS with noindex attribute
	SitemapExists         bool
	SitemapIsBlocked      bool
	RobotstxtExists       bool
	InternalFollowLinks   int
	InternalNoFollowLinks int
	ExternalFollowLinks   int
	ExternalNoFollowLinks int
	SponsoredLinks        int
	UGCLinks              int
}

type ExplorerView

type ExplorerView struct {
	ProjectView   *ProjectView
	Term          string
	PaginatorView PaginatorView
}

type ExportHreflang

type ExportHreflang struct {
	Origin       string
	OriginLang   string
	Hreflang     string
	HreflangLang string
}

type ExportImage

type ExportImage struct {
	Origin string
	Image  string
	Alt    string
}
type ExportLink struct {
	Origin      string
	Destination string
	Text        string
}

type ExportVideo

type ExportVideo struct {
	Origin string
	Video  string
}

type Hreflang

type Hreflang struct {
	URL  string
	Lang string
}

type Iframe

type Iframe struct {
	Origin string
	Iframe string
}

type Image

type Image struct {
	URL string
	Alt string
}
type InternalLink struct {
	PageReport PageReport
	Link       Link
}

type Issue

type Issue struct {
	PageReportId int64
	CrawlId      int64
	ErrorType    int
}

type IssueCount

type IssueCount struct {
	CriticalIssues []IssueGroup
	AlertIssues    []IssueGroup
	WarningIssues  []IssueGroup
}

type IssueGroup

type IssueGroup struct {
	ErrorType string
	Priority  int
	Count     int
}

type IssuesGroupView

type IssuesGroupView struct {
	ProjectView *ProjectView
	IssueCount  *IssueCount
}

type IssuesView

type IssuesView struct {
	ProjectView   *ProjectView
	Eid           string
	PaginatorView PaginatorView
}
type Link struct {
	URL        string
	ParsedURL  *url.URL
	Rel        string
	Text       string
	External   bool
	NoFollow   bool
	Sponsored  bool
	UGC        bool
	StatusCode int
}

type Message

type Message struct {
	Name string
	Data interface{}
}

type MultipageCallback

type MultipageCallback func(c *Crawl) *MultipageIssueReporter

type MultipageIssueReporter

type MultipageIssueReporter struct {
	Pstream   <-chan int64
	ErrorType int
}

The MultipageIssueReporter struct contains an int64 stream, which corresponds to the PageReport id, and an error type. Each MultipageIssueReporter will be called and an issue will be created for each PageReport which id is received through the channel.

type PageIssueReporter

type PageIssueReporter struct {
	Callback  func(*PageReport, *html.Node, *http.Header) bool
	ErrorType int
}

The PageIssueReporter struct contains a callback function and an error type. Each PageIssueReporter callback will be called and an issue will be created if it returns true.

type PageReport

type PageReport struct {
	Id                 int64
	URL                string
	ParsedURL          *url.URL
	RedirectURL        string
	Refresh            string
	StatusCode         int
	ContentType        string
	MediaType          string
	Lang               string
	Title              string
	Description        string
	Robots             string
	Noindex            bool
	Nofollow           bool
	Canonical          string
	H1                 string
	H2                 string
	Links              []Link
	ExternalLinks      []Link
	Words              int
	Hreflangs          []Hreflang
	Size               int64
	Images             []Image
	Scripts            []string
	Styles             []string
	Iframes            []string
	Audios             []string
	Videos             []Video
	BlockedByRobotstxt bool
	Crawled            bool
	InSitemap          bool
	InternalLinks      []InternalLink
	Depth              int
	BodyHash           string
	Timeout            bool
	TTFB               int
}

type PageReportMessage

type PageReportMessage struct {
	StatusCode int
	Crawled    int
	URL        string
	Crawling   bool
	Discovered int
}

type PageReportView

type PageReportView struct {
	PageReport PageReport
	ErrorTypes []string
	InLinks    []InternalLink
	Redirects  []PageReport
	Paginator  Paginator
}

type Paginator

type Paginator struct {
	CurrentPage  int
	NextPage     int
	PreviousPage int
	TotalPages   int
}

type PaginatorView

type PaginatorView struct {
	Paginator   Paginator
	PageReports []PageReport
}

type Project

type Project struct {
	Id                 int64
	URL                string
	Host               string
	IgnoreRobotsTxt    bool
	FollowNofollow     bool
	IncludeNoindex     bool
	Created            time.Time
	CrawlSitemap       bool
	AllowSubdomains    bool
	Deleting           bool
	BasicAuth          bool
	CheckExternalLinks bool
}

type ProjectView

type ProjectView struct {
	Project Project
	Crawl   Crawl
}

type SchemeCount

type SchemeCount struct {
	HTTP  int
	HTTPS int
}

type Script

type Script struct {
	Origin string
	Script string
}

type StatusCodeByDepth

type StatusCodeByDepth struct {
	Depth         int
	StatusCode100 int
	StatusCode200 int
	StatusCode300 int
	StatusCode400 int
	StatusCode500 int
}

type Style

type Style struct {
	Origin string
	Style  string
}

type User

type User struct {
	Id       int
	Email    string
	Password string
}

type Video

type Video struct {
	URL    string
	Poster string
}

Jump to

Keyboard shortcuts

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