crawler

package
v0.0.0-...-453eb42 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

type Crawler struct {
	// contains filtered or unexported fields
}

func NewCrawler

func NewCrawler(opt Option) Crawler

func (*Crawler) Crawl

func (c *Crawler) Crawl(ctx context.Context) error

func (*Crawler) Visit

func (c *Crawler) Visit(url string) error

Visit : visits the maven urls.

type Dependency

type Dependency struct {
	GroupID    string `xml:"groupId"`
	ArtifactID string `xml:"artifactId"`
	Version    string `xml:"version"`
	Text       string `xml:",chardata"`
	Scope      string `xml:"scope"`
	Optional   bool   `xml:"optional"`
}

type Index

type Index struct {
	GroupID     string
	ArtifactID  string
	Versions    []Version
	ArchiveType types.ArchiveType
}

type License

type License struct {
	Name                     string `xml:"name"`
	URL                      string `xml:"url"`
	LicenseKey               string
	ClassificationConfidence float64
}

type Metadata

type Metadata struct {
	GroupID    string     `xml:"groupId"`
	ArtifactID string     `xml:"artifactId"`
	Versioning Versioning `xml:"versioning"`
}

type Option

type Option struct {
	Limit    int64
	RootUrl  string
	CacheDir string
}

type PomParsedValues

type PomParsedValues struct {
	Licenses     []string
	Dependencies []Dependency
}

type PomProject

type PomProject struct {
	GroupID      string       `xml:"groupId"`
	ArtifactID   string       `xml:"artifactId"`
	Version      string       `xml:"version"`
	Name         string       `xml:"name"`
	Description  string       `xml:"description"`
	URL          string       `xml:"url"`
	Licenses     []License    `xml:"licenses>license"`
	Dependencies []Dependency `xml:"dependencies>dependency"`
	Properties   properties   `xml:"properties"`
}

type Version

type Version struct {
	Version    string
	SHA1       []byte
	License    string `json:",omitempty"`
	Dependency string `json:",omitempty"`
}

type Versioning

type Versioning struct {
	//Latest      string   `xml:"latest"`
	//Release     string   `xml:"release"`
	Versions    []string `xml:"versions>version"`
	LastUpdated string   `xml:"lastUpdated"`
}

Jump to

Keyboard shortcuts

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