Documentation ¶
Index ¶
- Constants
- func AllPkgTreeToPurl(v *model.AllPkgTree) string
- func ArtifactClientKey(input *generated.ArtifactInputSpec) string
- func ArtifactServerKey(input *model.ArtifactInputSpec) string
- func CreateVulnInput(vulnID string) (*generated.VulnerabilityInputSpec, error)
- func GetKey[T any, R any](item T, transformer func(T) R) R
- func GuacFilePurl(alg string, digest string, filename *string) string
- func GuacGenericPurl(s string) string
- func GuacPkgPurl(pkgName string, pkgVersion *string) string
- func GuacSrcIdToSourceInput(srcID string) (*generated.SourceInputSpec, error)
- func IsVcs(s string) bool
- func LicenseClientKey(l *generated.LicenseInputSpec) string
- func LicenseServerKey(l *model.LicenseInputSpec) string
- func PkgInputSpecToPurl(currentPkg *model.PkgInputSpec) string
- func PkgToPurl(purlType, namespace, name, version, subpath string, qualifiersList []string) string
- func PurlToPkg(purlUri string) (*model.PkgInputSpec, error)
- func PurlToPkgFilter(purl string) (model.PkgSpec, error)
- func SanitizeString(s string) string
- func SourceToSourceInput(srcType, namespace, name string, revision *string) *generated.SourceInputSpec
- func UpdatePurlForPackageNamespaces(packageObj *model.Package) ([]*model.PackageNamespace, error)
- func VcsToSrc(vcsUri string) (*model.SourceInputSpec, error)
- type PkgIds
- type SrcIds
- type VulnIds
Constants ¶
const ( PurlTypeGuac = "guac" PurlFilesGuac = "pkg:guac/files/" PurlPkgGuac = "pkg:guac/pkg/" )
Variables ¶
This section is empty.
Functions ¶
func AllPkgTreeToPurl ¶ added in v0.5.0
func AllPkgTreeToPurl(v *model.AllPkgTree) string
AllPkgTreeToPurl takes one package trie evaluation and converts it into a PURL it will only do this for one PURL, and will ignore other pkg tries in the fragment
func ArtifactClientKey ¶ added in v0.5.0
func ArtifactClientKey(input *generated.ArtifactInputSpec) string
func ArtifactServerKey ¶ added in v0.5.0
func ArtifactServerKey(input *model.ArtifactInputSpec) string
func CreateVulnInput ¶ added in v0.2.0
func CreateVulnInput(vulnID string) (*generated.VulnerabilityInputSpec, error)
func GetKey ¶ added in v0.5.0
collect is a simple helper to transform collections of a certain type to another type using the transform function func(T) R
func GuacGenericPurl ¶
func GuacPkgPurl ¶
func GuacSrcIdToSourceInput ¶ added in v0.8.0
func GuacSrcIdToSourceInput(srcID string) (*generated.SourceInputSpec, error)
convert src ID to source input that will be used by the clearly defined parser example: "uri": "sourcearchive::org.apache.commons::commons-text::1.9::?"
func LicenseClientKey ¶ added in v0.5.0
func LicenseClientKey(l *generated.LicenseInputSpec) string
func LicenseServerKey ¶ added in v0.5.0
func LicenseServerKey(l *model.LicenseInputSpec) string
func PkgInputSpecToPurl ¶ added in v0.1.1
func PkgInputSpecToPurl(currentPkg *model.PkgInputSpec) string
func PurlToPkg ¶
func PurlToPkg(purlUri string) (*model.PkgInputSpec, error)
PurlToPkg converts a purl URI string into a graphql package node
func PurlToPkgFilter ¶ added in v0.6.0
PurlToPkgFilter converts a purl URI string into a graphql package filter spec. The result will only match the input purl, and no other packages. The filter is created with Guac's purl special casing.
func SanitizeString ¶
func SourceToSourceInput ¶ added in v0.8.0
func SourceToSourceInput(srcType, namespace, name string, revision *string) *generated.SourceInputSpec
func UpdatePurlForPackageNamespaces ¶ added in v0.4.0
func UpdatePurlForPackageNamespaces(packageObj *model.Package) ([]*model.PackageNamespace, error)
Types ¶
type PkgIds ¶ added in v0.5.0
func PkgClientKey ¶ added in v0.5.0
func PkgClientKey(pkg *generated.PkgInputSpec) PkgIds
func PkgServerKey ¶ added in v0.5.0
func PkgServerKey(pkg *model.PkgInputSpec) PkgIds
type SrcIds ¶ added in v0.5.0
func SrcClientKey ¶ added in v0.5.0
func SrcClientKey(src *generated.SourceInputSpec) SrcIds
func SrcServerKey ¶ added in v0.5.0
func SrcServerKey(src *model.SourceInputSpec) SrcIds
type VulnIds ¶ added in v0.5.0
func VulnClientKey ¶ added in v0.5.0
func VulnClientKey(vuln *generated.VulnerabilityInputSpec) VulnIds
func VulnServerKey ¶ added in v0.5.0
func VulnServerKey(vuln *model.VulnerabilityInputSpec) VulnIds