resolver

package
v0.0.0-...-5ad46ce Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindLicenseFiles

func FindLicenseFiles(dirname string, matcher Matcher) ([]string, error)

func LocateGoModProjects

func LocateGoModProjects(projects []GoModProject) (map[string]Dependency, error)

func LocateNpmPackageLockV3Projects

func LocateNpmPackageLockV3Projects(root string, projects []Project) (map[string]Dependency, error)

func LocateProjects

func LocateProjects(roots []string, projects []Project) (map[string]Dependency, error)

Types

type DepProject

type DepProject struct {
	// contains filtered or unexported fields
}

func (DepProject) Name

func (p DepProject) Name() string

func (DepProject) Optional

func (p DepProject) Optional() bool

func (DepProject) Version

func (p DepProject) Version() string

type Dependency

type Dependency struct {
	Name      string
	Alias     string
	Files     []string
	SourceDir string
	Version   string
}

type GoModProject

type GoModProject struct {
	Path    string
	Version string
	Dir     string
}

func ProjectsFromGoModFile

func ProjectsFromGoModFile(filename string) ([]GoModProject, error)

type Matcher

type Matcher func(string) bool

func CompilePatternConfig

func CompilePatternConfig(cfg config.PatternConfig) (Matcher, error)

type NpmPackage

type NpmPackage struct {
	Name     string `json:"name"`
	Version  string `json:"version"`
	Optional bool   `json:"optional"`
}

type NpmProject

type NpmProject struct {
	// contains filtered or unexported fields
}

func (NpmProject) Name

func (p NpmProject) Name() string

func (NpmProject) Optional

func (p NpmProject) Optional() bool

func (NpmProject) Version

func (p NpmProject) Version() string

type PackageLockV3

type PackageLockV3 struct {
	Name     string                `json:"name"`
	Version  string                `json:"version"`
	Packages map[string]NpmPackage `json:"packages"`
}

type Project

type Project interface {
	Name() string
	Optional() bool
	Version() string
}

func ProjectsFromDepLockfile

func ProjectsFromDepLockfile(filename string) ([]Project, error)

func ProjectsFromNpmLockfileV3

func ProjectsFromNpmLockfileV3(filename string) ([]Project, error)

func ProjectsFromYarnLockfile

func ProjectsFromYarnLockfile(filename string) ([]Project, error)

type YarnProject

type YarnProject struct {
	// contains filtered or unexported fields
}

func (YarnProject) Name

func (p YarnProject) Name() string

func (YarnProject) Optional

func (p YarnProject) Optional() bool

func (YarnProject) Version

func (p YarnProject) Version() string

Jump to

Keyboard shortcuts

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