components

package
v0.0.0-...-6c88d0f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 15 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) WithReleasePage

func (f Fetcher) WithReleasePage(uri string) Fetcher

type OutputDependency

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

type Release

type Release struct {
	SemVer *semver.Version

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

type ReleaseFile

type ReleaseFile struct {
	URL string

	Filename string `json:"filename"`
	OS       string `json:"os"`
	Arch     string `json:"arch"`
	Version  string `json:"version"`
	SHA256   string `json:"sha256"`
	Size     int    `json:"size"`
	Kind     string `json:"kind"`
}

Jump to

Keyboard shortcuts

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