scrapper

package
v0.0.0-...-1b2181e Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SnykioURI = "https://snyk.io/vuln/page/%d?type=composer"

Variables

This section is empty.

Functions

This section is empty.

Types

type Results

type Results struct {
	ScrappedAt      time.Time
	Vulnerabilities []vulnerability.Vulnerability
}

type Scrapper

type Scrapper interface {
	Run(storage storage.Storage) (Results, error)
}

type ScrapperService

type ScrapperService interface {
	New(scrapper Scrapper)
	Scrape() (Results, error)
}

type Snykio

type Snykio struct {
	TargetURI string
	Storage   storage.Storage
}

func NewSnykioScrapper

func NewSnykioScrapper(targetURI string, storage storage.Storage) (*Snykio, error)

func (*Snykio) Run

func (s *Snykio) Run(storage storage.Storage) (Results, error)

func (*Snykio) ScrapePage

func (s *Snykio) ScrapePage(pageNumber int) (*SnykioDocument, error)

func (*Snykio) ScrapeURI

func (s *Snykio) ScrapeURI(startPage, endPage int) error

type SnykioDocument

type SnykioDocument struct {
	*goquery.Document
}

func (*SnykioDocument) ParseVersions

func (s *SnykioDocument) ParseVersions(versions string) (result []string)

func (*SnykioDocument) ToVulnerabilities

func (s *SnykioDocument) ToVulnerabilities() []vulnerability.Vulnerability

Jump to

Keyboard shortcuts

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