Documentation
¶
Index ¶
- Constants
- Variables
- func ListExtractors() []string
- func ListParsers() []string
- type ApkInstalledExtractor
- type CSVExtractor
- type CargoLockExtractor
- type CargoLockFile
- type CargoLockPackage
- type ComposerLock
- type ComposerLockExtractor
- type ComposerPackage
- type ConanGraphLock
- type ConanGraphNode
- type ConanLockExtractor
- type ConanLockFile
- type ConanReference
- type DepFile
- type DpkgStatusExtractor
- type Ecosystem
- type Extractor
- type GemfileLockExtractor
- type GoBinaryExtractor
- type GoLockExtractor
- type GradleLockExtractor
- type GradleVerificationMetadataExtractor
- type GradleVerificationMetadataFile
- type LocalFile
- type Lockfile
- func ExtractDeps(f DepFile, extractAs string) (Lockfile, error)
- func FromApkInstalled(pathToInstalled string) (Lockfile, error)
- func FromCSVFile(pathToCSV string, parseAs string) (Lockfile, error)
- func FromCSVRows(filePath string, parseAs string, rows []string) (Lockfile, error)
- func FromDpkgStatus(pathToStatus string) (Lockfile, error)
- func FromOSVScannerResults(pathToInstalled string) (Lockfile, error)
- func Parse(pathToLockfile string, parseAs string) (Lockfile, error)
- type MavenLockDependency
- type MavenLockExtractor
- type MavenLockFile
- type MavenLockProperties
- type MixLockExtractor
- type NestedDepFile
- type NodeModulesExtractor
- type NpmLockDependency
- type NpmLockExtractor
- type NpmLockPackage
- type NpmLockfile
- type NuGetLockExtractor
- type NuGetLockPackage
- type NuGetLockfile
- type OSVScannerResultsExtractor
- type PackageDetails
- func ParseApkInstalled(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseCargoLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseComposerLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseConanLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseDpkgStatus(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseGemfileLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseGoLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseGradleLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseGradleVerificationMetadata(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseMavenLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseMixLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseNpmLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseNuGetLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseOSVScannerResults(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParsePdmLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParsePipenvLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParsePnpmLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParsePoetryLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParsePubspecLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseRenvLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseRequirementsTxt(pathToLockfile string) ([]PackageDetails, error)deprecated
- func ParseYarnLock(pathToLockfile string) ([]PackageDetails, error)deprecated
- type PackageDetailsParser
- type Packages
- type PdmLockExtractor
- type PdmLockFile
- type PdmLockPackage
- type PipenvLock
- type PipenvLockExtractor
- type PipenvPackage
- type PnpmLockExtractor
- type PnpmLockPackage
- type PnpmLockPackageResolution
- type PnpmLockfile
- type PoetryLockExtractor
- type PoetryLockFile
- type PoetryLockPackage
- type PoetryLockPackageSource
- type PubspecLockDescription
- type PubspecLockExtractor
- type PubspecLockPackage
- type PubspecLockfile
- type RenvLockExtractor
- type RenvLockfile
- type RenvPackage
- type RequirementsTxtExtractor
- type YarnLockExtractor
Constants ¶
const AlpineFallbackVersion = "v3.20"
const PdmEcosystem = PipEcosystem
const PipenvEcosystem = PipEcosystem
const PnpmEcosystem = NpmEcosystem
const PoetryEcosystem = PipEcosystem
const YarnEcosystem = NpmEcosystem
Variables ¶
var ErrExtractorNotFound = errors.New("could not determine extractor")
var ErrIncompatibleFileFormat = errors.New("file format is incompatible, but this is expected")
var ErrOpenNotSupported = errors.New("this file does not support opening files")
var ErrParserNotFound = errors.New("could not determine parser")
Functions ¶
func ListExtractors ¶ added in v1.4.0
func ListExtractors() []string
func ListParsers ¶
func ListParsers() []string
Types ¶
type ApkInstalledExtractor ¶ added in v1.4.0
type ApkInstalledExtractor struct{}
func (ApkInstalledExtractor) Extract ¶ added in v1.4.0
func (e ApkInstalledExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (ApkInstalledExtractor) ShouldExtract ¶ added in v1.4.0
func (e ApkInstalledExtractor) ShouldExtract(path string) bool
type CSVExtractor ¶ added in v1.4.0
type CSVExtractor struct{}
func (CSVExtractor) Extract ¶ added in v1.4.0
func (e CSVExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (CSVExtractor) ShouldExtract ¶ added in v1.4.0
func (e CSVExtractor) ShouldExtract(_ string) bool
type CargoLockExtractor ¶ added in v1.4.0
type CargoLockExtractor struct{}
func (CargoLockExtractor) Extract ¶ added in v1.4.0
func (e CargoLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (CargoLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e CargoLockExtractor) ShouldExtract(path string) bool
type CargoLockFile ¶
type CargoLockFile struct {
Version int `toml:"version"`
Packages []CargoLockPackage `toml:"package"`
}
type CargoLockPackage ¶
type ComposerLock ¶
type ComposerLock struct {
Packages []ComposerPackage `json:"packages"`
PackagesDev []ComposerPackage `json:"packages-dev"`
}
type ComposerLockExtractor ¶ added in v1.4.0
type ComposerLockExtractor struct{}
func (ComposerLockExtractor) Extract ¶ added in v1.4.0
func (e ComposerLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (ComposerLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e ComposerLockExtractor) ShouldExtract(path string) bool
type ComposerPackage ¶
type ConanGraphLock ¶ added in v1.2.0
type ConanGraphLock struct {
Nodes map[string]ConanGraphNode `json:"nodes"`
}
type ConanGraphNode ¶ added in v1.2.0
type ConanLockExtractor ¶ added in v1.4.0
type ConanLockExtractor struct{}
func (ConanLockExtractor) Extract ¶ added in v1.4.0
func (e ConanLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (ConanLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e ConanLockExtractor) ShouldExtract(path string) bool
type ConanLockFile ¶ added in v1.2.0
type ConanLockFile struct {
Version string `json:"version"`
// conan v0.4- lockfiles use "graph_lock", "profile_host" and "profile_build"
GraphLock ConanGraphLock `json:"graph_lock,omitempty"`
ProfileHost string `json:"profile_host,omitempty"`
ProfileBuild string `json:"profile_build,omitempty"`
// conan v0.5+ lockfiles use "requires", "build_requires" and "python_requires"
Requires []string `json:"requires,omitempty"`
BuildRequires []string `json:"build_requires,omitempty"`
PythonRequires []string `json:"python_requires,omitempty"`
}
type ConanReference ¶ added in v1.2.0
type DepFile ¶ added in v1.4.0
type DepFile interface {
io.Reader
// Open opens an NestedDepFile based on the path of the
// current DepFile if the provided path is relative.
//
// If the path is an absolute path, then it is opened absolutely.
Open(path string) (NestedDepFile, error)
Path() string
}
DepFile is an abstraction for a file that has been opened for extraction, and that knows how to open other DepFiles relative to itself.
type DpkgStatusExtractor ¶ added in v1.4.0
type DpkgStatusExtractor struct{}
func (DpkgStatusExtractor) Extract ¶ added in v1.4.0
func (e DpkgStatusExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (DpkgStatusExtractor) ShouldExtract ¶ added in v1.4.0
func (e DpkgStatusExtractor) ShouldExtract(path string) bool
type Ecosystem ¶
type Ecosystem string
const AlpineEcosystem Ecosystem = "Alpine"
const BundlerEcosystem Ecosystem = "RubyGems"
const CRANEcosystem Ecosystem = "CRAN"
const CargoEcosystem Ecosystem = "crates.io"
const ComposerEcosystem Ecosystem = "Packagist"
const ConanEcosystem Ecosystem = "ConanCenter"
TODO this is tentative and subject to change depending on the OSV schema
const DebianEcosystem Ecosystem = "Debian"
const GoEcosystem Ecosystem = "Go"
const MavenEcosystem Ecosystem = "Maven"
const MixEcosystem Ecosystem = "Hex"
const NpmEcosystem Ecosystem = "npm"
const NuGetEcosystem Ecosystem = "NuGet"
const PipEcosystem Ecosystem = "PyPI"
const PubEcosystem Ecosystem = "Pub"
func KnownEcosystems ¶
func KnownEcosystems() []Ecosystem
KnownEcosystems returns a list of ecosystems that `lockfile` supports automatically inferring an extractor for based on a file path.
func (Ecosystem) IsDevGroup ¶ added in v1.6.0
IsDevGroup returns if any string in groups indicates the development dependency group for the specified ecosystem.
type Extractor ¶ added in v1.4.0
type Extractor interface {
// ShouldExtract checks if the Extractor should be used for the given path.
ShouldExtract(path string) bool
Extract(f DepFile) ([]PackageDetails, error)
}
func FindExtractor ¶ added in v1.4.0
type GemfileLockExtractor ¶ added in v1.4.0
type GemfileLockExtractor struct{}
func (GemfileLockExtractor) Extract ¶ added in v1.4.0
func (e GemfileLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (GemfileLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e GemfileLockExtractor) ShouldExtract(path string) bool
type GoBinaryExtractor ¶ added in v1.8.0
type GoBinaryExtractor struct{}
func (GoBinaryExtractor) Extract ¶ added in v1.8.0
func (e GoBinaryExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (GoBinaryExtractor) ShouldExtract ¶ added in v1.8.0
func (e GoBinaryExtractor) ShouldExtract(path string) bool
type GoLockExtractor ¶ added in v1.4.0
type GoLockExtractor struct{}
func (GoLockExtractor) Extract ¶ added in v1.4.0
func (e GoLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (GoLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e GoLockExtractor) ShouldExtract(path string) bool
type GradleLockExtractor ¶ added in v1.4.0
type GradleLockExtractor struct{}
func (GradleLockExtractor) Extract ¶ added in v1.4.0
func (e GradleLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (GradleLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e GradleLockExtractor) ShouldExtract(path string) bool
type GradleVerificationMetadataExtractor ¶ added in v1.7.4
type GradleVerificationMetadataExtractor struct{}
func (GradleVerificationMetadataExtractor) Extract ¶ added in v1.7.4
func (e GradleVerificationMetadataExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (GradleVerificationMetadataExtractor) ShouldExtract ¶ added in v1.7.4
func (e GradleVerificationMetadataExtractor) ShouldExtract(path string) bool
type GradleVerificationMetadataFile ¶ added in v1.7.4
type LocalFile ¶ added in v1.4.0
type LocalFile struct {
// TODO(rexpan): This should be *os.File, as that would allow us to access other underlying functions that definitely will exist
io.ReadCloser
// contains filtered or unexported fields
}
A LocalFile represents a file that exists on the local filesystem.
type Lockfile ¶
type Lockfile struct {
FilePath string `json:"filePath"`
ParsedAs string `json:"parsedAs"`
Packages Packages `json:"packages"`
}
func FromApkInstalled ¶ added in v1.2.0
FromApkInstalled attempts to parse the given file as an "apk-installed" lockfile used by the Alpine Package Keeper (apk) to record installed packages.
func FromCSVRows ¶
func FromDpkgStatus ¶ added in v1.2.0
FromDpkgStatus attempts to parse the given file as an "dpkg-status" lockfile used by the Debian Package (dpkg) to record installed packages.
func FromOSVScannerResults ¶ added in v1.4.0
FromOSVScannerResults attempts to extract packages stored in the OSVScannerResults format
type MavenLockDependency ¶
type MavenLockDependency struct {
XMLName xml.Name `xml:"dependency"`
GroupID string `xml:"groupId"`
ArtifactID string `xml:"artifactId"`
Version string `xml:"version"`
Scope string `xml:"scope"`
}
func (MavenLockDependency) ResolveVersion ¶
func (mld MavenLockDependency) ResolveVersion(lockfile MavenLockFile) string
type MavenLockExtractor ¶ added in v1.4.0
type MavenLockExtractor struct{}
func (MavenLockExtractor) Extract ¶ added in v1.4.0
func (e MavenLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (MavenLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e MavenLockExtractor) ShouldExtract(path string) bool
type MavenLockFile ¶
type MavenLockFile struct {
XMLName xml.Name `xml:"project"`
ModelVersion string `xml:"modelVersion"`
GroupID string `xml:"groupId"`
ArtifactID string `xml:"artifactId"`
Properties MavenLockProperties `xml:"properties"`
Dependencies []MavenLockDependency `xml:"dependencies>dependency"`
ManagedDependencies []MavenLockDependency `xml:"dependencyManagement>dependencies>dependency"`
}
type MavenLockProperties ¶
type MavenLockProperties struct {
// contains filtered or unexported fields
}
func (*MavenLockProperties) UnmarshalXML ¶
func (p *MavenLockProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type MixLockExtractor ¶ added in v1.4.0
type MixLockExtractor struct{}
func (MixLockExtractor) Extract ¶ added in v1.4.0
func (e MixLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (MixLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e MixLockExtractor) ShouldExtract(path string) bool
type NestedDepFile ¶ added in v1.4.0
NestedDepFile is an abstraction for a file that has been opened while extracting another file, and would need to be closed.
func OpenLocalDepFile ¶ added in v1.4.0
func OpenLocalDepFile(path string) (NestedDepFile, error)
type NodeModulesExtractor ¶ added in v1.7.1
type NodeModulesExtractor struct{}
func (NodeModulesExtractor) Extract ¶ added in v1.7.1
func (e NodeModulesExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (NodeModulesExtractor) ShouldExtract ¶ added in v1.7.1
func (e NodeModulesExtractor) ShouldExtract(path string) bool
type NpmLockDependency ¶
type NpmLockDependency struct {
// For an aliased package, Version is like "npm:[name]@[version]"
Version string `json:"version"`
Dependencies map[string]NpmLockDependency `json:"dependencies,omitempty"`
Dev bool `json:"dev,omitempty"`
Optional bool `json:"optional,omitempty"`
Requires map[string]string `json:"requires,omitempty"`
}
type NpmLockExtractor ¶ added in v1.4.0
type NpmLockExtractor struct{}
func (NpmLockExtractor) Extract ¶ added in v1.4.0
func (e NpmLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (NpmLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e NpmLockExtractor) ShouldExtract(path string) bool
type NpmLockPackage ¶
type NpmLockPackage struct {
// For an aliased package, Name is the real package name
Name string `json:"name"`
Version string `json:"version"`
Resolved string `json:"resolved"`
Dependencies map[string]string `json:"dependencies,omitempty"`
DevDependencies map[string]string `json:"devDependencies,omitempty"`
OptionalDependencies map[string]string `json:"optionalDependencies,omitempty"`
PeerDependencies map[string]string `json:"peerDependencies,omitempty"`
Dev bool `json:"dev,omitempty"`
DevOptional bool `json:"devOptional,omitempty"`
Optional bool `json:"optional,omitempty"`
Link bool `json:"link,omitempty"`
}
type NpmLockfile ¶
type NpmLockfile struct {
Version int `json:"lockfileVersion"`
// npm v1- lockfiles use "dependencies"
Dependencies map[string]NpmLockDependency `json:"dependencies,omitempty"`
// npm v2+ lockfiles use "packages"
Packages map[string]NpmLockPackage `json:"packages,omitempty"`
}
type NuGetLockExtractor ¶ added in v1.4.0
type NuGetLockExtractor struct{}
func (NuGetLockExtractor) Extract ¶ added in v1.4.0
func (e NuGetLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (NuGetLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e NuGetLockExtractor) ShouldExtract(path string) bool
type NuGetLockPackage ¶ added in v1.1.0
type NuGetLockPackage struct {
Resolved string `json:"resolved"`
}
type NuGetLockfile ¶ added in v1.1.0
type NuGetLockfile struct {
Version int `json:"version"`
Dependencies map[string]map[string]NuGetLockPackage `json:"dependencies"`
}
NuGetLockfile contains the required dependency information as defined in https://github.com/NuGet/NuGet.Client/blob/6.5.0.136/src/NuGet.Core/NuGet.ProjectModel/ProjectLockFile/PackagesLockFileFormat.cs
type OSVScannerResultsExtractor ¶ added in v1.4.0
type OSVScannerResultsExtractor struct{}
func (OSVScannerResultsExtractor) Extract ¶ added in v1.4.0
func (e OSVScannerResultsExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (OSVScannerResultsExtractor) ShouldExtract ¶ added in v1.4.0
func (e OSVScannerResultsExtractor) ShouldExtract(_ string) bool
type PackageDetails ¶
type PackageDetails struct {
Name string `json:"name"`
Version string `json:"version"`
Commit string `json:"commit,omitempty"`
Ecosystem Ecosystem `json:"ecosystem,omitempty"`
CompareAs Ecosystem `json:"compareAs,omitempty"`
DepGroups []string `json:"depGroups,omitempty"`
ImageOrigin *models.ImageOriginDetails `json:"imageOrigin,omitempty"`
}
TODO(v2): These fields do not need JSON tags I believe
func ParseApkInstalled
deprecated
added in
v1.1.0
func ParseApkInstalled(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use ApkInstalledExtractor.Extract instead
func ParseCargoLock
deprecated
func ParseCargoLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use CargoLockExtractor.Extract instead
func ParseComposerLock
deprecated
func ParseComposerLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use ComposerLockExtractor.Extract instead
func ParseConanLock
deprecated
added in
v1.2.0
func ParseConanLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use ConanLockExtractor.Extract instead
func ParseDpkgStatus
deprecated
added in
v1.2.0
func ParseDpkgStatus(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use DpkgStatusExtractor.Extract instead
func ParseGemfileLock
deprecated
func ParseGemfileLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use GemfileLockExtractor.Extract instead
func ParseGoLock
deprecated
func ParseGoLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use GoLockExtractor.Extract instead
func ParseGradleLock
deprecated
added in
v1.0.1
func ParseGradleLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use GradleLockExtractor.Extract instead
func ParseGradleVerificationMetadata
deprecated
added in
v1.7.4
func ParseGradleVerificationMetadata(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use GradleVerificationMetadataExtractor.Extract instead
func ParseMavenLock
deprecated
func ParseMavenLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use MavenLockExtractor.Extract instead
func ParseMixLock
deprecated
func ParseMixLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use MixLockExtractor.Extract instead
func ParseNpmLock
deprecated
func ParseNpmLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use NpmLockExtractor.Extract instead
func ParseNuGetLock
deprecated
added in
v1.1.0
func ParseNuGetLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use NuGetLockExtractor.Extract instead
func ParseOSVScannerResults
deprecated
added in
v1.4.0
func ParseOSVScannerResults(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use OSVScannerResultsExtractor.Extract instead
func ParsePdmLock
deprecated
added in
v1.6.2
func ParsePdmLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use PdmLockExtractor.Extract instead
func ParsePipenvLock
deprecated
added in
v1.1.0
func ParsePipenvLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use PipenvLockExtractor.Extract instead
func ParsePnpmLock
deprecated
func ParsePnpmLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use PnpmLockExtractor.Extract instead
func ParsePoetryLock
deprecated
func ParsePoetryLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use PoetryLockExtractor.Extract instead
func ParsePubspecLock
deprecated
func ParsePubspecLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use PubspecLockExtractor.Extract instead
func ParseRenvLock
deprecated
added in
v1.5.0
func ParseRenvLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use RenvLockExtractor.Extract instead
func ParseRequirementsTxt
deprecated
func ParseRequirementsTxt(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use RequirementsTxtExtractor.Extract instead
func ParseYarnLock
deprecated
func ParseYarnLock(pathToLockfile string) ([]PackageDetails, error)
Deprecated: use YarnLockExtractor.Extract instead
type PackageDetailsParser ¶
type PackageDetailsParser = func(pathToLockfile string) ([]PackageDetails, error)
func FindParser ¶
func FindParser(pathToLockfile string, parseAs string) (PackageDetailsParser, string)
type PdmLockExtractor ¶ added in v1.6.2
type PdmLockExtractor struct{}
func (PdmLockExtractor) Extract ¶ added in v1.6.2
func (p PdmLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (PdmLockExtractor) ShouldExtract ¶ added in v1.6.2
func (p PdmLockExtractor) ShouldExtract(path string) bool
type PdmLockFile ¶ added in v1.6.2
type PdmLockFile struct {
Version string `toml:"lock-version"`
Packages []PdmLockPackage `toml:"package"`
}
type PdmLockPackage ¶ added in v1.6.2
type PipenvLock ¶ added in v1.1.0
type PipenvLock struct {
Packages map[string]PipenvPackage `json:"default"`
PackagesDev map[string]PipenvPackage `json:"develop"`
}
type PipenvLockExtractor ¶ added in v1.4.0
type PipenvLockExtractor struct{}
func (PipenvLockExtractor) Extract ¶ added in v1.4.0
func (e PipenvLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (PipenvLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e PipenvLockExtractor) ShouldExtract(path string) bool
type PipenvPackage ¶ added in v1.1.0
type PipenvPackage struct {
Version string `json:"version"`
}
type PnpmLockExtractor ¶ added in v1.4.0
type PnpmLockExtractor struct{}
func (PnpmLockExtractor) Extract ¶ added in v1.4.0
func (e PnpmLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (PnpmLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e PnpmLockExtractor) ShouldExtract(path string) bool
type PnpmLockPackage ¶
type PnpmLockPackage struct {
Resolution PnpmLockPackageResolution `yaml:"resolution"`
Name string `yaml:"name"`
Version string `yaml:"version"`
Dev bool `yaml:"dev"`
}
type PnpmLockfile ¶
type PnpmLockfile struct {
Version float64 `yaml:"lockfileVersion"`
Packages map[string]PnpmLockPackage `yaml:"packages,omitempty"`
}
func (*PnpmLockfile) UnmarshalYAML ¶ added in v1.3.2
func (l *PnpmLockfile) UnmarshalYAML(unmarshal func(interface{}) error) error
type PoetryLockExtractor ¶ added in v1.4.0
type PoetryLockExtractor struct{}
func (PoetryLockExtractor) Extract ¶ added in v1.4.0
func (e PoetryLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (PoetryLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e PoetryLockExtractor) ShouldExtract(path string) bool
type PoetryLockFile ¶
type PoetryLockFile struct {
Version int `toml:"version"`
Packages []PoetryLockPackage `toml:"package"`
}
type PoetryLockPackage ¶
type PoetryLockPackage struct {
Name string `toml:"name"`
Version string `toml:"version"`
Optional bool `toml:"optional"`
Source PoetryLockPackageSource `toml:"source"`
}
type PoetryLockPackageSource ¶
type PubspecLockDescription ¶
type PubspecLockDescription struct {
Name string `yaml:"name"`
URL string `yaml:"url"`
Path string `yaml:"path"`
Ref string `yaml:"resolved-ref"`
}
func (*PubspecLockDescription) UnmarshalYAML ¶
func (pld *PubspecLockDescription) UnmarshalYAML(value *yaml.Node) error
type PubspecLockExtractor ¶ added in v1.4.0
type PubspecLockExtractor struct{}
func (PubspecLockExtractor) Extract ¶ added in v1.4.0
func (e PubspecLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (PubspecLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e PubspecLockExtractor) ShouldExtract(path string) bool
type PubspecLockPackage ¶
type PubspecLockPackage struct {
Source string `yaml:"source"`
Description PubspecLockDescription `yaml:"description"`
Version string `yaml:"version"`
Dependency string `yaml:"dependency"`
}
type PubspecLockfile ¶
type PubspecLockfile struct {
Packages map[string]PubspecLockPackage `yaml:"packages,omitempty"`
Sdks map[string]string `yaml:"sdks"`
}
type RenvLockExtractor ¶ added in v1.5.0
type RenvLockExtractor struct{}
func (RenvLockExtractor) Extract ¶ added in v1.5.0
func (e RenvLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (RenvLockExtractor) ShouldExtract ¶ added in v1.5.0
func (e RenvLockExtractor) ShouldExtract(path string) bool
type RenvLockfile ¶ added in v1.5.0
type RenvLockfile struct {
Packages map[string]RenvPackage `json:"Packages"`
}
type RenvPackage ¶ added in v1.5.0
type RequirementsTxtExtractor ¶ added in v1.4.0
type RequirementsTxtExtractor struct{}
func (RequirementsTxtExtractor) Extract ¶ added in v1.4.0
func (e RequirementsTxtExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (RequirementsTxtExtractor) ShouldExtract ¶ added in v1.4.0
func (e RequirementsTxtExtractor) ShouldExtract(path string) bool
type YarnLockExtractor ¶ added in v1.4.0
type YarnLockExtractor struct{}
func (YarnLockExtractor) Extract ¶ added in v1.4.0
func (e YarnLockExtractor) Extract(f DepFile) ([]PackageDetails, error)
func (YarnLockExtractor) ShouldExtract ¶ added in v1.4.0
func (e YarnLockExtractor) ShouldExtract(path string) bool
Source Files
¶
- apk-installed.go
- csv.go
- dpkg-status.go
- ecosystems.go
- errors.go
- extract.go
- extractor.go
- go-binary.go
- node-modules.go
- osv-vuln-results.go
- parse-cargo-lock.go
- parse-composer-lock.go
- parse-conan-lock.go
- parse-gemfile-lock.go
- parse-go-lock.go
- parse-gradle-lock.go
- parse-gradle-verification-metadata.go
- parse-maven-lock.go
- parse-mix-lock.go
- parse-npm-lock.go
- parse-nuget-lock.go
- parse-pdm-lock.go
- parse-pipenv-lock.go
- parse-pnpm-lock.go
- parse-poetry-lock.go
- parse-pubspec-lock.go
- parse-renv-lock.go
- parse-requirements-txt.go
- parse-yarn-lock.go
- parse.go
- types.go