Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Bower is the module type for bower.io Bower = Type("bower") // 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{Bower, Composer, Maven, SBT, Gradle, NuGet, Pip, Ruby, Nodejs, Golang, VendoredArchives}
Types holds the list of all available module types for analysis
Functions ¶
func IsResolved ¶ added in v0.4.5
func IsResolved(dep Dependency) bool
Types ¶
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"` Type string `yaml:"type"` // this is later transformed to a module Type }
Config defines a config for a builder's entry point
type Dependency ¶
Dependency represents a code library brought in by running a Build
type Locator ¶
type Locator string
Locator is a string specifying a particular dependency and revision
func DepLocator ¶ added in v0.4.5
func DepLocator(dep Dependency) Locator
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). Value interface{} }
A Module is a unit of buildable code within a project.
Click to show internal directories.
Click to hide internal directories.