scrape

package
v0.0.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Info

func Info(p *graph.Package, info *PackageInfo) error

Types

type Advisory

type Advisory struct {
	Source         string   `json:"source"`
	SourceID       string   `json:"sourceID"`
	SourceURL      string   `json:"sourceURL"`
	Title          string   `json:"title"`
	Description    string   `json:"description"`
	ReferenceURLs  []string `json:"referenceURLs"`
	Severity       string   `json:"severity"`
	GitHubSeverity string   `json:"gitHubSeverity"`
	Aliases        []string `json:"aliases"`
	DisclosedAt    int      `json:"disclosedAt"`
	ObservedAt     int      `json:"observedAt"`
}

type PackageInfo

type PackageInfo struct {
	Package struct {
		System string `json:"system"`
		Name   string `json:"name"`
	} `json:"package"`
	Owners  []interface{} `json:"owners"`
	Version struct {
		Version                string        `json:"version"`
		SymbolicVersions       []interface{} `json:"symbolicVersions"`
		RefreshedAt            int           `json:"refreshedAt"`
		IsDefault              bool          `json:"isDefault"`
		Licenses               []string      `json:"licenses"`
		DependencyCount        int           `json:"dependencyCount"`
		DependentCount         int           `json:"dependentCount"`
		DependentCountDirect   int           `json:"dependentCountDirect"`
		DependentCountIndirect int           `json:"dependentCountIndirect"`
		Links                  struct {
			Origins []string `json:"origins"`
			Repo    string   `json:"repo"`
		} `json:"links"`
		Projects []struct {
			Type        string `json:"type"`
			Name        string `json:"name"`
			ObservedAt  int    `json:"observedAt"`
			Issues      int    `json:"issues"`
			Forks       int    `json:"forks"`
			Stars       int    `json:"stars"`
			Description string `json:"description"`
			License     string `json:"license"`
			Link        string `json:"link"`
			ScorecardV2 struct {
				Date string `json:"date"`
				Repo struct {
					Name   string `json:"name"`
					Commit string `json:"commit"`
				} `json:"repo"`
				Scorecard struct {
					Version string `json:"version"`
					Commit  string `json:"commit"`
				} `json:"scorecard"`
				Check []struct {
					Name          string `json:"name"`
					Documentation struct {
						Short string `json:"short"`
						Url   string `json:"url"`
					} `json:"documentation"`
					Score   int      `json:"score"`
					Reason  string   `json:"reason"`
					Details []string `json:"details"`
				} `json:"check"`
				Metadata []interface{} `json:"metadata"`
				Score    float64       `json:"score"`
			} `json:"scorecardV2"`
		} `json:"projects"`
		Advisories      []*Advisory `json:"advisories"`
		RelatedPackages struct {
		} `json:"relatedPackages"`
	} `json:"version"`
	DefaultVersion string `json:"defaultVersion"`
}

Jump to

Keyboard shortcuts

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