Documentation
¶
Index ¶
- Constants
- Variables
- func ListParsers() []string
- type BunLockfile
- type CargoLockFile
- type CargoLockPackage
- type ComposerLock
- type ComposerPackage
- type Ecosystem
- type Lockfile
- type MavenLockDependency
- type MavenLockFile
- type MavenLockProperties
- type NpmLockDependency
- type NpmLockPackage
- type NpmLockfile
- type NuGetLockPackage
- type NuGetLockfile
- type PackageDetails
- func ParseBunLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseCargoLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseComposerLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseGemfileLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseGoLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseGradleLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseMavenLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseMixLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseNpmLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseNuGetLock(pathToLockfile string) ([]PackageDetails, error)
- func ParsePdmLock(pathToLockfile string) ([]PackageDetails, error)
- func ParsePipenvLock(pathToLockfile string) ([]PackageDetails, error)
- func ParsePnpmLock(pathToLockfile string) ([]PackageDetails, error)
- func ParsePoetryLock(pathToLockfile string) ([]PackageDetails, error)
- func ParsePubspecLock(pathToLockfile string) ([]PackageDetails, error)
- func ParsePylock(pathToLockfile string) ([]PackageDetails, error)
- func ParseRenvLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseRequirementsTxt(pathToLockfile string) ([]PackageDetails, error)
- func ParseUvLock(pathToLockfile string) ([]PackageDetails, error)
- func ParseYarnLock(pathToLockfile string) ([]PackageDetails, error)
- type PackageDetailsParser
- type Packages
- type PdmLockFile
- type PdmLockPackage
- type PipenvLock
- type PipenvPackage
- type PnpmLockPackage
- type PnpmLockPackageResolution
- type PnpmLockfile
- type PoetryLockFile
- type PoetryLockPackage
- type PoetryLockPackageSource
- type PubspecLockDescription
- type PubspecLockPackage
- type PubspecLockfile
- type PylockLockfile
- type PylockPackage
- type RenvLockfile
- type RenvPackage
- type UvLockFile
- type UvLockPackage
- type UvLockPackageSource
- type UvOptionalDependency
Constants ¶
View Source
const BunEcosystem = NpmEcosystem
View Source
const PdmEcosystem = PipEcosystem
View Source
const PipenvEcosystem = PipEcosystem
View Source
const PnpmEcosystem = NpmEcosystem
View Source
const PoetryEcosystem = PipEcosystem
View Source
const PylockEcosystem = PipEcosystem
View Source
const UvEcosystem = PipEcosystem
View Source
const YarnEcosystem = NpmEcosystem
Variables ¶
View Source
var ErrNuGetUnsupportedLockfileVersion = errors.New("unsupported lockfile version")
View Source
var ErrParserNotFound = errors.New("could not determine parser")
Functions ¶
func ListParsers ¶
func ListParsers() []string
Types ¶
type BunLockfile ¶ added in v0.14.0
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 ComposerPackage ¶
type Ecosystem ¶
const BundlerEcosystem Ecosystem = "RubyGems"
const CRANEcosystem Ecosystem = "CRAN"
const CargoEcosystem Ecosystem = "crates.io"
const ComposerEcosystem Ecosystem = "Packagist"
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
type Lockfile ¶
type Lockfile struct {
FilePath string `json:"filePath"`
ParsedAs string `json:"parsedAs"`
Packages Packages `json:"packages"`
}
func FromCSVRows ¶
type MavenLockDependency ¶
type MavenLockDependency struct {
XMLName xml.Name `xml:"dependency"`
GroupID string `xml:"groupId"`
ArtifactID string `xml:"artifactId"`
Version string `xml:"version"`
}
func (MavenLockDependency) ResolveVersion ¶
func (mld MavenLockDependency) ResolveVersion(lockfile MavenLockFile) string
type MavenLockFile ¶
type MavenLockFile struct {
XMLName xml.Name `xml:"project"`
ModelVersion string `xml:"modelVersion"`
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 NpmLockDependency ¶
type NpmLockDependency struct {
Version string `json:"version"`
Dependencies map[string]NpmLockDependency `json:"dependencies,omitempty"`
}
type NpmLockPackage ¶
type NpmLockfile ¶
type NpmLockfile struct {
Version int `json:"lockfileVersion"`
// npm v1- lockfiles use "dependencies"
Dependencies map[string]NpmLockDependency `json:"dependencies"`
// npm v2+ lockfiles use "packages"
Packages map[string]NpmLockPackage `json:"packages,omitempty"`
}
type NuGetLockPackage ¶ added in v0.10.0
type NuGetLockPackage struct {
Resolved string `json:"resolved"`
}
type NuGetLockfile ¶ added in v0.10.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 PackageDetails ¶
type PackageDetails = internal.PackageDetails
func ParseBunLock ¶ added in v0.14.0
func ParseBunLock(pathToLockfile string) ([]PackageDetails, error)
func ParseCargoLock ¶
func ParseCargoLock(pathToLockfile string) ([]PackageDetails, error)
func ParseComposerLock ¶
func ParseComposerLock(pathToLockfile string) ([]PackageDetails, error)
func ParseGemfileLock ¶
func ParseGemfileLock(pathToLockfile string) ([]PackageDetails, error)
func ParseGoLock ¶
func ParseGoLock(pathToLockfile string) ([]PackageDetails, error)
func ParseGradleLock ¶ added in v0.10.0
func ParseGradleLock(pathToLockfile string) ([]PackageDetails, error)
func ParseMavenLock ¶
func ParseMavenLock(pathToLockfile string) ([]PackageDetails, error)
func ParseMixLock ¶
func ParseMixLock(pathToLockfile string) ([]PackageDetails, error)
func ParseNpmLock ¶
func ParseNpmLock(pathToLockfile string) ([]PackageDetails, error)
func ParseNuGetLock ¶ added in v0.10.0
func ParseNuGetLock(pathToLockfile string) ([]PackageDetails, error)
func ParsePdmLock ¶ added in v0.13.0
func ParsePdmLock(pathToLockfile string) ([]PackageDetails, error)
func ParsePipenvLock ¶ added in v0.10.0
func ParsePipenvLock(pathToLockfile string) ([]PackageDetails, error)
func ParsePnpmLock ¶
func ParsePnpmLock(pathToLockfile string) ([]PackageDetails, error)
func ParsePoetryLock ¶ added in v0.8.0
func ParsePoetryLock(pathToLockfile string) ([]PackageDetails, error)
func ParsePubspecLock ¶ added in v0.8.0
func ParsePubspecLock(pathToLockfile string) ([]PackageDetails, error)
func ParsePylock ¶ added in v0.16.0
func ParsePylock(pathToLockfile string) ([]PackageDetails, error)
func ParseRenvLock ¶ added in v0.13.0
func ParseRenvLock(pathToLockfile string) ([]PackageDetails, error)
func ParseRequirementsTxt ¶
func ParseRequirementsTxt(pathToLockfile string) ([]PackageDetails, error)
func ParseUvLock ¶ added in v0.14.0
func ParseUvLock(pathToLockfile string) ([]PackageDetails, error)
func ParseYarnLock ¶
func ParseYarnLock(pathToLockfile string) ([]PackageDetails, error)
type PackageDetailsParser ¶
type PackageDetailsParser = func(pathToLockfile string) ([]PackageDetails, error)
func FindParser ¶
func FindParser(pathToLockfile string, parseAs string) (PackageDetailsParser, string)
type PdmLockFile ¶ added in v0.13.0
type PdmLockFile struct {
Version string `toml:"lock-version"`
Packages []PdmLockPackage `toml:"package"`
}
type PdmLockPackage ¶ added in v0.13.0
type PipenvLock ¶ added in v0.10.0
type PipenvLock struct {
Packages map[string]PipenvPackage `json:"default"`
PackagesDev map[string]PipenvPackage `json:"develop"`
}
type PipenvPackage ¶ added in v0.10.0
type PipenvPackage struct {
Version string `json:"version"`
}
type PnpmLockPackage ¶
type PnpmLockPackage struct {
Resolution PnpmLockPackageResolution `yaml:"resolution"`
Name string `yaml:"name"`
Version string `yaml:"version"`
}
type PnpmLockfile ¶
type PnpmLockfile struct {
Version float64 `yaml:"lockfileVersion"`
Packages map[string]PnpmLockPackage `yaml:"packages,omitempty"`
}
func (*PnpmLockfile) UnmarshalYAML ¶ added in v0.11.0
func (l *PnpmLockfile) UnmarshalYAML(value *yaml.Node) error
type PoetryLockFile ¶ added in v0.8.0
type PoetryLockFile struct {
Version int `toml:"version"`
Packages []PoetryLockPackage `toml:"package"`
}
type PoetryLockPackage ¶ added in v0.8.0
type PoetryLockPackage struct {
Name string `toml:"name"`
Version string `toml:"version"`
Source PoetryLockPackageSource `toml:"source"`
}
type PoetryLockPackageSource ¶ added in v0.8.0
type PubspecLockDescription ¶ added in v0.8.0
type PubspecLockDescription struct {
Name string `yaml:"name"`
URL string `yaml:"url"`
Path string `yaml:"path"`
Ref string `yaml:"resolved-ref"`
}
func (*PubspecLockDescription) UnmarshalYAML ¶ added in v0.8.0
func (pld *PubspecLockDescription) UnmarshalYAML(value *yaml.Node) error
type PubspecLockPackage ¶ added in v0.8.0
type PubspecLockPackage struct {
Source string `yaml:"source"`
Description PubspecLockDescription `yaml:"description"`
Version string `yaml:"version"`
}
type PubspecLockfile ¶ added in v0.8.0
type PubspecLockfile struct {
Packages map[string]PubspecLockPackage `yaml:"packages,omitempty"`
Sdks map[string]string `yaml:"sdks"`
}
type PylockLockfile ¶ added in v0.16.0
type PylockLockfile struct {
Version string `toml:"lock-version"`
Packages []PylockPackage `toml:"packages"`
}
type PylockPackage ¶ added in v0.16.0
type RenvLockfile ¶ added in v0.13.0
type RenvLockfile struct {
Packages map[string]RenvPackage `json:"Packages"`
}
type RenvPackage ¶ added in v0.13.0
type UvLockFile ¶ added in v0.14.0
type UvLockFile struct {
Version int `toml:"version"`
Packages []UvLockPackage `toml:"package"`
}
type UvLockPackage ¶ added in v0.14.0
type UvLockPackage struct {
Name string `toml:"name"`
Version string `toml:"version"`
Source UvLockPackageSource `toml:"source"`
// uv stores "groups" as a table under "package" after all the packages, which due
// to how TOML works means it ends up being a property on the last package, even
// through in this context it's a global property rather than being per-package
Groups map[string][]UvOptionalDependency `toml:"optional-dependencies"`
}
type UvLockPackageSource ¶ added in v0.14.0
type UvOptionalDependency ¶ added in v0.14.0
type UvOptionalDependency struct {
Name string `toml:"name"`
}
Source Files
¶
- csv.go
- ecosystems.go
- parse-bun-lock.go
- parse-cargo-lock.go
- parse-composer-lock.go
- parse-gemfile-lock.go
- parse-go-lock.go
- parse-gradle-lock.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-pylock.go
- parse-renv-lock.go
- parse-requirements-txt.go
- parse-uv-lock.go
- parse-yarn-lock.go
- parse.go
- types.go
Click to show internal directories.
Click to hide internal directories.