components

package
v0.0.0-...-6272b85 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertReleaseToDependency

func ConvertReleaseToDependency(release Release) (cargo.ConfigMetadataDependency, error)

func FindNewVersions

func FindNewVersions(path string, versions []string) ([]string, error)

func GenerateLicenseInformation

func GenerateLicenseInformation(url string) ([]interface{}, error)

func GeneratePURL

func GeneratePURL(id, version, checksum, source string) string

GeneratePURL can be used to populate the `purl` field of dependency metadata PURL stands for package URL. https://github.com/package-url/purl-spec

func WriteOutput

func WriteOutput(path string, dependencies []cargo.ConfigMetadataDependency, target string) error

Types

type Fetcher

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

func NewFetcher

func NewFetcher() Fetcher

func (Fetcher) Get

func (f Fetcher) Get() ([]Release, error)

func (Fetcher) WithReleaseIndex

func (f Fetcher) WithReleaseIndex(uri string) Fetcher

type OutputDependency

type OutputDependency struct {
	cargo.ConfigMetadataDependency
	Target string `json:"target"`
}

type Release

type Release struct {
	SemVer *semver.Version

	EOLDate string

	Version string        `json:"version"`
	Files   []ReleaseFile `json:"files"`
}

type ReleaseFile

type ReleaseFile struct {
	Name string `json:"name"`
	Rid  string `json:"rid"`
	URL  string `json:"url"`
	Hash string `json:"hash"`
}

Jump to

Keyboard shortcuts

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