scan

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGolangDeps

func GetGolangDeps(path string) (map[string]GoPkg, error)

GetGolangDeps uses `go list` gather a list of dependencies located at `path` returning an array of `GoPkg` structs

func GetJarDeps

func GetJarDeps(path string) (map[string]string, error)

GetJarDeps uses github.com/mcoops/jargo retrieve the java dependencies

func GetMvnDeps

func GetMvnDeps(path string) (map[string]string, error)

GetMvnDeps uses the mvn command to attempt to list the dependencies for a given project located at `path`

func GetNodeJSDeps

func GetNodeJSDeps(path string) (map[string]NodeJSGather, error)

GetNodeJSDeps scans the path for either `yarn.lock` or `package-lock.json`, then use the appropriate pkg managers to produce depencies lists of type `NodeJSGather`

func GetPythonDeps

func GetPythonDeps(path string) (map[string]string, error)

GetPythonDeps scans path for python deps using the `requirements.txt` file

func GetRubyDeps

func GetRubyDeps(path string) (map[string]string, error)

GetRubyDeps uses `bundle update --bundler` to list ruby dependencies when a Gemfile.lock file exists

Types

type GlideDeps added in v1.0.15

type GlideDeps struct {
	Name    string
	Version string
}

func GetGlideDeps added in v1.0.15

func GetGlideDeps(path string) ([]GlideDeps, error)

type GoListDeps

type GoListDeps struct {
	ImportPath string `json:"ImportPath"`
	Module     struct {
		Version string `json:"Version"`
		Replace struct {
			Version string `json:"Version"`
		} `json:"Replace"`
	} `json:"Module"`
	GoFiles []string `json:"GoFiles"`
}

GoListDeps holds the import path, version and gofiles for a given go dependency

type GoPkg

type GoPkg struct {
	Version string
	Gofiles []string
}

GoPkg holds the version and go paths/files for a given dep

type GoPkgLockDeps added in v1.0.14

type GoPkgLockDeps struct {
	Name    string
	Version string
}

func GetGoPkgDeps added in v1.0.14

func GetGoPkgDeps(path string) ([]GoPkgLockDeps, error)

type NodeJSGather

type NodeJSGather struct {
	Name    string
	Version string
}

NodeJSGather dependencies found, name and version

Jump to

Keyboard shortcuts

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