scan

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 20 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)

Types

type GlideDeps

type GlideDeps struct {
	Name    string
	Version string
}

func GetGlideDeps

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

type GoPkgLockDeps struct {
	Name    string
	Version string
}

func GetGoPkgDeps

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

type NodeJSGather

type NodeJSGather struct {
	Name    string
	Version string
}

NodeJSGather dependencies found, name and version

type Script added in v1.0.30

type Script struct {
	Name string
	Data []byte
}

Jump to

Keyboard shortcuts

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