Documentation ¶
Index ¶
- func FindNewVersions(id string, buildpackConfig cargo.Config, allVersions []string) ([]string, error)
- func GeneratePurl(name, version, sourceChecksum, source string) string
- func Validate(release RubyRelease) (bool, error)
- func WriteOutput(outputPath string, dependencies []Dependency) error
- type Dependency
- type DeprecationDate
- type DeprecationDateRetriever
- type License
- type LicenseRetriever
- type ReleaseFetcher
- type RubyBranch
- type RubyRelease
- type SHA256
- type URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindNewVersions ¶
func FindNewVersions(id string, buildpackConfig cargo.Config, allVersions []string) ([]string, error)
FindNewVersions will take in a dependency ID, a buildpack.toml content in the form of a cargo.Config, and a slice of all upstream versions available. It will filter the upstream versions by buildpack.toml constraint and ID, and then return versions that conform to the constraint, number of patches, and are not already present in the buildpack.toml
func GeneratePurl ¶
GeneratePurl generates a package URL given input information about a dependency
func Validate ¶
func Validate(release RubyRelease) (bool, error)
func WriteOutput ¶
func WriteOutput(outputPath string, dependencies []Dependency) error
Types ¶
type Dependency ¶
type Dependency struct { cargo.ConfigMetadataDependency Target string `json:"target,omitempty"` }
func GenerateMetadata ¶
func GenerateMetadata(release RubyRelease, targets []string, licenseRetriever License, deprecationDate DeprecationDate) ([]Dependency, error)
GenerateMetadata will generate Ruby dependency-specific metadata for each given target Note that `jammy` stack-related entries will only be generated when the version is 3.1 or greater, due to OpenSSL v3 incompatibilites with Ruby 3.0 and below.
type DeprecationDate ¶
type DeprecationDateRetriever ¶
type DeprecationDateRetriever struct{}
func NewDeprecationDateRetriever ¶
func NewDeprecationDateRetriever() DeprecationDateRetriever
type LicenseRetriever ¶
type LicenseRetriever struct{}
func NewLicenseRetriever ¶
func NewLicenseRetriever() LicenseRetriever
func (LicenseRetriever) LookupLicenses ¶
func (LicenseRetriever) LookupLicenses(dependencyName, sourceURL string) ([]interface{}, error)
type ReleaseFetcher ¶
type ReleaseFetcher struct {
// contains filtered or unexported fields
}
func NewReleaseFetcher ¶
func NewReleaseFetcher(feed string) ReleaseFetcher
func (ReleaseFetcher) GetUpstreamReleases ¶
func (rf ReleaseFetcher) GetUpstreamReleases() (map[string]RubyRelease, error)
GetUpstreamVersions will take in a ReleaseFetcher version feed, parse the content, and return all available versions in the form of a map, where the key is the version (string) and the value is a struct containing obtained version metadata.