Documentation
¶
Overview ¶
this file retrieves the canonical list of cataloger names and their selectors from syft's task factories.
this file provides a single source of truth for all capability file paths used in generation and testing.
Index ¶
- Constants
- func AllPackageCatalogerInfo() ([]capabilities.CatalogerInfo, error)
- func AppconfigPath(repoRoot string) string
- func CapabilitiesDir(repoRoot string) string
- func CatalogerDir(repoRoot string) string
- func EcosystemCapabilitiesPath(catalogerDir, ecosystem string) string
- func FindTestFixtureDirs(repoRoot string) ([]string, error)
- func LoadCapabilities(catalogerDir, repoRoot string) (*capabilities.Document, map[string]*yaml.Node, error)
- func ReadTestObservations(path string) (*pkgtestobservation.Test, error)
- func RepoRoot() (string, error)
Constants ¶
const ( // CatalogerDirRel is the cataloger directory relative to repo root CatalogerDirRel = "syft/pkg/cataloger" // InternalCapabilitiesDirRel is internal capabilities dir relative to repo root InternalCapabilitiesDirRel = "internal/capabilities" // CapabilitiesFilename is the capabilities file name within each ecosystem dir CapabilitiesFilename = "capabilities.yaml" // AppconfigFilename is the application config filename AppconfigFilename = "appconfig.yaml" )
path constants - single source of truth for all capability file locations
Variables ¶
This section is empty.
Functions ¶
func AllPackageCatalogerInfo ¶
func AllPackageCatalogerInfo() ([]capabilities.CatalogerInfo, error)
AllPackageCatalogerInfo gets all package cataloger info (names and selectors) from task factories
func AppconfigPath ¶
AppconfigPath returns path to appconfig.yaml (in internal/capabilities)
func CapabilitiesDir ¶
CapabilitiesDir returns absolute path to internal capabilities
func CatalogerDir ¶
CatalogerDir returns absolute path to cataloger directory
func EcosystemCapabilitiesPath ¶
EcosystemCapabilitiesPath returns path to an ecosystem's capabilities.yaml
func FindTestFixtureDirs ¶
FindTestFixtureDirs walks the cataloger directory tree and returns all test-fixtures directories
func LoadCapabilities ¶
func LoadCapabilities(catalogerDir, repoRoot string) (*capabilities.Document, map[string]*yaml.Node, error)
LoadCapabilities loads the capabilities document from a YAML file. Returns both the parsed document and the original YAML node tree to preserve comments. Exported for use by the generator in generate/main.go
func ReadTestObservations ¶
func ReadTestObservations(path string) (*pkgtestobservation.Test, error)
ReadTestObservations reads and parses a test-observations.json file
Types ¶
This section is empty.