crawler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 16 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

type Index

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

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 Version

type Version struct {
	Version string
	SHA1    []byte
}

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