Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockedPackage ¶
type LockedPackage struct {
Version string `json:"version"`
Hashes []string `json:"hashes"`
Markers string `json:"markers"`
Index string `json:"index"`
Extras []string `json:"extras"`
Git string `json:"git"`
Ref string `json:"ref"`
Path string `json:"path"`
Editable bool `json:"editable"`
}
LockedPackage represents a locked package in Pipfile.lock.
type Pipfile ¶
type Pipfile struct {
Source []PipfileSource `toml:"source"`
Packages map[string]interface{} `toml:"packages"`
DevPkgs map[string]interface{} `toml:"dev-packages"`
Requires PipfileRequiresPythonVer `toml:"requires"`
}
Pipfile represents the structure of a Pipfile.
func ParsePipfile ¶
ParsePipfile reads and parses a Pipfile from the given path.
func (*Pipfile) ToPackageNames ¶ added in v0.17.2
ToPackageNames converts Pipfile packages to just package names without version specifiers. This is useful when using a lockfile to constrain versions via pip's -c flag.
type PipfileLock ¶
type PipfileLock struct {
Meta PipfileLockMeta `json:"_meta"` //nolint:tagliatelle // Pipfile.lock uses _meta
Default map[string]LockedPackage `json:"default"`
Develop map[string]LockedPackage `json:"develop"`
}
PipfileLock represents the structure of a Pipfile.lock file.
func ParsePipfileLock ¶
func ParsePipfileLock(path string) (*PipfileLock, error)
ParsePipfileLock reads and parses a Pipfile.lock from the given path.
func (*PipfileLock) ToConstraints ¶
func (l *PipfileLock) ToConstraints(includeDevDeps bool) []string
ToConstraints converts locked packages to pip constraints format. Each package is converted to a line like "package==version".
type PipfileLockHash ¶
type PipfileLockHash struct {
Sha256 string `json:"sha256"`
}
PipfileLockHash contains the hash of the Pipfile.
type PipfileLockMeta ¶
type PipfileLockMeta struct {
Hash PipfileLockHash `json:"hash"`
Sources []PipfileLockSource `json:"sources"`
Requires PipfileLockRequires `json:"requires"`
}
PipfileLockMeta contains metadata about the lock file.
type PipfileLockRequires ¶
type PipfileLockRequires struct {
PythonVersion string `json:"python_version"` //nolint:tagliatelle // Pipfile.lock uses snake_case
}
PipfileLockRequires contains Python version requirements.
type PipfileLockSource ¶
type PipfileLockSource struct {
Name string `json:"name"`
URL string `json:"url"`
VerifySSL bool `json:"verify_ssl"` //nolint:tagliatelle // Pipfile.lock uses snake_case
}
PipfileLockSource represents a package source.
type PipfileRequiresPythonVer ¶
type PipfileRequiresPythonVer struct {
PythonVersion string `toml:"python_version"`
}
PipfileRequiresPythonVer represents the Python version requirements.
type PipfileSource ¶
type PipfileSource struct {
Name string `toml:"name"`
URL string `toml:"url"`
Verify bool `toml:"verify_ssl"`
}
PipfileSource represents a package source in the Pipfile.
type Plugin ¶
type Plugin struct{}
func (Plugin) BuildDepGraphsFromDir ¶
func (p Plugin) BuildDepGraphsFromDir( ctx context.Context, log logger.Logger, dir string, options *ecosystems.SCAPluginOptions, ) ([]ecosystems.SCAResult, error)
BuildDepGraphsFromDir discovers and builds dependency graphs for Pipenv projects.