internal

package
v1.42.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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

View Source
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

func AppconfigPath(repoRoot string) string

AppconfigPath returns path to appconfig.yaml (in internal/capabilities)

func CapabilitiesDir

func CapabilitiesDir(repoRoot string) string

CapabilitiesDir returns absolute path to internal capabilities

func CatalogerDir

func CatalogerDir(repoRoot string) string

CatalogerDir returns absolute path to cataloger directory

func EcosystemCapabilitiesPath

func EcosystemCapabilitiesPath(catalogerDir, ecosystem string) string

EcosystemCapabilitiesPath returns path to an ecosystem's capabilities.yaml

func FindTestFixtureDirs

func FindTestFixtureDirs(repoRoot string) ([]string, error)

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

func RepoRoot

func RepoRoot() (string, error)

RepoRoot finds the git repository root directory. Exported for use by the generator in generate/main.go

Types

This section is empty.

Jump to

Keyboard shortcuts

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