Documentation ¶
Index ¶
- Variables
- func CPEProductName(name string) string
- func CPEProductVersion(version string) string
- func ConvertToSemver(originalVersion string) string
- func FromCdxBom(bom *cdx.BOM, convertComponentType bool) *cdxBom
- func PackageToPurl(ecosystem, packageName string) string
- func Purl(component cdx.Component) string
- func PurlToCPE(purl string, componentType string) (string, error)
- func PurlToEcosystem(purlType string) string
- func SemverFix(version string) (string, error)
- func SemverSort(versions []string)
- type SBOM
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidVersion = fmt.Errorf("invalid version")
)
View Source
var PURL_ECOSYSTEMS = map[string]string{
"Alpine": "apk",
"crates.io": "cargo",
"Debian": "deb",
"Go": "golang",
"Hackage": "hackage",
"Hex": "hex",
"Maven": "maven",
"npm": "npm",
"NuGet": "nuget",
"OSS-Fuzz": "generic",
"Packagist": "composer",
"Pub": "pub",
"PyPI": "pypi",
"RubyGems": "gem",
}
Functions ¶
func CPEProductName ¶
func CPEProductVersion ¶
func ConvertToSemver ¶
ConvertToSemver converts any versioning scheme to a semver-like versioning scheme
func FromCdxBom ¶
if the second parameter is set to true, the component type will be converted to the correct type THIS SHOULD ONLY be done, if the component type wasnt set by us. if the component type was set by us, we shouldnt change it
func PackageToPurl ¶
func PurlToEcosystem ¶
func SemverSort ¶ added in v0.5.14
func SemverSort(versions []string)
Types ¶
Click to show internal directories.
Click to hide internal directories.