Documentation ¶
Index ¶
- Constants
- Variables
- func NormalizeGitURL(project string) string
- type Analyzed
- type AntOptions
- type Builder
- type Config
- type Dependency
- type GoOptions
- type GradleOptions
- type Hashes
- type ImportPath
- type ImportPathString
- type Locator
- type MavenOptions
- type Module
- type NuGetOptions
- type PythonOptions
- type Type
Constants ¶
View Source
const ( // Ant is the module type for Apache Ant Ant = Type("ant") // Bower is the module type for bower.io Bower = Type("bower") // Cocoapods is the module type for cocoapods Cocoapods = Type("cocoapods") // Composer is the module type for getcomposer.org Composer = Type("composer") // Maven is the module type for maven.apache.org Maven = Type("maven") // SBT is the module type for scala-sbt.org SBT = Type("sbt") // Gradle is the module type for gradle.org Gradle = Type("gradle") // NuGet is the module type for nuget.org NuGet = Type("nuget") // Pip is the module type for https://pip.pypa.io/en/stable/ Pip = Type("pip") // Ruby is the module type for Bundler (bundler.io) Ruby = Type("ruby") // Nodejs is the module type for NPM (npmjs.org) and Yarn (yarnpkg.com) Nodejs = Type("nodejs") // Golang is the module type for dep, glide, godep, govendor, vndr, and manual // gopath vendoring Golang = Type("golang") // VendoredArchives is a module type for archive formats (.tar, .rpm, .zip, etc...) VendoredArchives = Type("vendoredarchives") )
Variables ¶
View Source
var Types = []Type{Ant, Bower, Cocoapods, Composer, Maven, SBT, Gradle, NuGet, Pip, Ruby, Nodejs, Golang, VendoredArchives}
Types holds the list of all available module types for analysis
Functions ¶
func NormalizeGitURL ¶ added in v0.6.1
Types ¶
type Analyzed ¶ added in v0.6.1
type Analyzed struct { Module Module Builder Builder Dependencies []Dependency }
type AntOptions ¶ added in v0.6.1
type Builder ¶
type Builder interface { // Initialize gathers build environment information and does build setup. Initialize() error // Build runs a best-effort attempt at building the module. Build(m Module, force bool) error // Analyze returns the dependencies of a module. Analyze(m Module, allowUnresolved bool) ([]Dependency, error) // IsBuilt checks whether a module has been built. IsBuilt(m Module, allowUnresolved bool) (bool, error) // IsModule takes a string module type and returns whether it matches to use this Builder. IsModule(key string) (bool, error) // DiscoverModules finds what modules are available for analysis in a given directory. DiscoverModules(dir string) ([]Config, error) }
A Builder is an implementation of functionality for different build systems.
type Config ¶ added in v0.4.5
type Config struct { Name string `yaml:"name"` Path string `yaml:"path"` // this should really be renamed to Target (for e.g. Golang with gopaths or .NET or Maven with manifest files) Type string `yaml:"type"` Options map[string]interface{} `yaml:"options,omitempty"` }
Config defines a config for a builder's entry point
type Dependency ¶
type Dependency struct { Locator Hashes Via []ImportPath }
Dependency represents a code library brought in by running a Build
type GradleOptions ¶ added in v0.6.1
type Hashes ¶ added in v0.6.3
Hashes contains hexadecimal checksums of code libraries brought in by running a Build
type ImportPath ¶ added in v0.6.1
type ImportPath []Locator
func ReadImportPath ¶ added in v0.6.1
func ReadImportPath(s ImportPathString) ImportPath
func (ImportPath) String ¶ added in v0.6.1
func (p ImportPath) String() ImportPathString
type ImportPathString ¶ added in v0.6.1
type ImportPathString string
type Locator ¶
type Locator struct { Fetcher string `json:"fetcher"` Project string `json:"package"` Revision string `json:"revision"` }
func ReadLocator ¶ added in v0.6.1
func (Locator) IsResolved ¶ added in v0.6.1
type MavenOptions ¶ added in v0.6.1
type MavenOptions struct {
Settings string
}
type Module ¶
type Module struct { Name string Type Type // Target is the entry point or manifest path for the build system. The exact // meaning is Type-dependent. Target string // Dir is the absolute path to the module's working directory (the directory // you would normally run the build command from). Dir string // Different modules in a monolith may correspond to different FOSSA projects // or revisions. // TODO: use these values. Project string Revision string // A catch-all for builders to add metadata (a la Context.Value). Context interface{} }
A Module is a unit of buildable code within a project.
type NuGetOptions ¶ added in v0.6.1
type NuGetOptions struct {
TargetFramework string
}
type PythonOptions ¶ added in v0.6.1
type PythonOptions struct {
Strategy string
}
Click to show internal directories.
Click to hide internal directories.