components

package
v0.0.0-...-5525e69 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertReleaseToDependency

func ConvertReleaseToDependency(release Release, signatureVerifier SignatureVerifier) (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, targets map[string][]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) WithAPI

func (f Fetcher) WithAPI(uri string) Fetcher

type OutputDependency

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

type Release

type Release struct {
	SemVer  *semver.Version
	Version string
	Files   []ReleaseFile
}

type ReleaseFile

type ReleaseFile struct {
	Name string `json:"name"`
	URL  string `json:"browser_download_url"`
}

type SignatureVerifier

type SignatureVerifier interface {
	Verify(signatureURL, targetURL string) error
}

type Verifier

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

func NewVerifier

func NewVerifier() Verifier

func (Verifier) Verify

func (v Verifier) Verify(signatureURL, targetURL string) error

func (Verifier) WithErrorWriter

func (v Verifier) WithErrorWriter(writer io.Writer) Verifier

func (Verifier) WithPublicKeyBlock

func (v Verifier) WithPublicKeyBlock(key string) Verifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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