Documentation ¶
Index ¶
- func New(moduleType module.Type) module.Builder
- type AntBuilder
- func (builder *AntBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *AntBuilder) Build(m module.Module, force bool) error
- func (builder *AntBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *AntBuilder) Initialize() error
- func (builder *AntBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *AntBuilder) IsModule(target string) (bool, error)
- type BowerBuilder
- func (builder *BowerBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *BowerBuilder) Build(m module.Module, force bool) error
- func (builder *BowerBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *BowerBuilder) Initialize() error
- func (builder *BowerBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *BowerBuilder) IsModule(target string) (bool, error)
- type BowerConfiguration
- type CocoapodsBuilder
- func (builder *CocoapodsBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *CocoapodsBuilder) Build(m module.Module, force bool) error
- func (builder *CocoapodsBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *CocoapodsBuilder) Initialize() error
- func (builder *CocoapodsBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *CocoapodsBuilder) IsModule(target string) (bool, error)
- type CocoapodsModule
- type ComposerBuilder
- func (builder *ComposerBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *ComposerBuilder) Build(m module.Module, force bool) error
- func (builder *ComposerBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *ComposerBuilder) Initialize() error
- func (builder *ComposerBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *ComposerBuilder) IsModule(target string) (bool, error)
- type GoBuilder
- func (builder *GoBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *GoBuilder) Build(m module.Module, force bool) error
- func (builder *GoBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *GoBuilder) Initialize() error
- func (builder *GoBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *GoBuilder) IsModule(target string) (bool, error)
- type GradleBuilder
- func (builder *GradleBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *GradleBuilder) Build(m module.Module, force bool) error
- func (builder *GradleBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *GradleBuilder) Initialize() error
- func (builder *GradleBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *GradleBuilder) IsModule(target string) (bool, error)
- type Imported
- type MavenArtifact
- type MavenBuilder
- func (builder *MavenBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *MavenBuilder) Build(m module.Module, force bool) error
- func (builder *MavenBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *MavenBuilder) Initialize() error
- func (builder *MavenBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *MavenBuilder) IsModule(target string) (bool, error)
- type NodeJSBuilder
- func (builder *NodeJSBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *NodeJSBuilder) Build(m module.Module, force bool) error
- func (builder *NodeJSBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *NodeJSBuilder) Initialize() error
- func (builder *NodeJSBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *NodeJSBuilder) IsModule(target string) (bool, error)
- type NuGetBuilder
- func (builder *NuGetBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *NuGetBuilder) Build(m module.Module, force bool) error
- func (builder *NuGetBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *NuGetBuilder) Initialize() error
- func (builder *NuGetBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *NuGetBuilder) IsModule(target string) (bool, error)
- type POMFile
- type PipBuilder
- func (builder *PipBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *PipBuilder) Build(m module.Module, force bool) error
- func (builder *PipBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *PipBuilder) Initialize() error
- func (builder *PipBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *PipBuilder) IsModule(target string) (bool, error)
- type PodFileLock
- type RubyBuilder
- func (builder *RubyBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *RubyBuilder) Build(m module.Module, force bool) error
- func (builder *RubyBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *RubyBuilder) Initialize() error
- func (builder *RubyBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *RubyBuilder) IsModule(target string) (bool, error)
- type SBTBuilder
- func (builder *SBTBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *SBTBuilder) Build(m module.Module, force bool) error
- func (builder *SBTBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *SBTBuilder) Initialize() error
- func (builder *SBTBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *SBTBuilder) IsModule(target string) (bool, error)
- type VendoredArchiveBuilder
- func (builder *VendoredArchiveBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *VendoredArchiveBuilder) Build(m module.Module, force bool) error
- func (builder *VendoredArchiveBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *VendoredArchiveBuilder) Initialize() error
- func (builder *VendoredArchiveBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *VendoredArchiveBuilder) IsModule(target string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AntBuilder ¶ added in v0.6.1
AntBuilder implements build context for SBT builds
func (*AntBuilder) Analyze ¶ added in v0.6.1
func (builder *AntBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze resolves a lib directory and parses the jars inside
func (*AntBuilder) Build ¶ added in v0.6.1
func (builder *AntBuilder) Build(m module.Module, force bool) error
Build is currently not implemented
func (*AntBuilder) DiscoverModules ¶ added in v0.6.1
func (builder *AntBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules returns a root build.xml if found, and build configs for all sub-projects otherwise
func (*AntBuilder) Initialize ¶ added in v0.6.1
func (builder *AntBuilder) Initialize() error
Initialize collects metadata on Java and SBT binaries
type BowerBuilder ¶
BowerBuilder implements Builder for Bower
func (*BowerBuilder) Analyze ¶
func (builder *BowerBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze reads the output of `bower ls --json` TODO: fall back to old method of reading `bower_components/*/.bower.json`s?
func (*BowerBuilder) Build ¶
func (builder *BowerBuilder) Build(m module.Module, force bool) error
Build runs `bower install --production` and cleans with `rm -rf bower_components`
func (*BowerBuilder) DiscoverModules ¶
func (builder *BowerBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules finds any bower.json modules not in node_modules or bower_components folders
func (*BowerBuilder) Initialize ¶
func (builder *BowerBuilder) Initialize() error
Initialize collects metadata on Node and Bower binaries
type BowerConfiguration ¶ added in v0.5.1
type CocoapodsBuilder ¶ added in v0.6.1
CocoapodsBuilder implements Builder for Cocoapods (podfile & podfile.lock) builds
func (*CocoapodsBuilder) Analyze ¶ added in v0.6.1
func (builder *CocoapodsBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze parses the `podfile.lock` YAML file and analyzes
func (*CocoapodsBuilder) Build ¶ added in v0.6.1
func (builder *CocoapodsBuilder) Build(m module.Module, force bool) error
Build runs `pod install`
func (*CocoapodsBuilder) DiscoverModules ¶ added in v0.6.1
func (builder *CocoapodsBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules returns ModuleConfigs that match Podfile(.lock) in the directory
func (*CocoapodsBuilder) Initialize ¶ added in v0.6.1
func (builder *CocoapodsBuilder) Initialize() error
Initialize collects metadata on Cocoapods
type CocoapodsModule ¶ added in v0.6.1
CocoapodsModule implements Dependency for Cocoapods builds
func (CocoapodsModule) Fetcher ¶ added in v0.6.1
func (m CocoapodsModule) Fetcher() string
Fetcher always returns pod for CocoapodsModule
func (CocoapodsModule) Package ¶ added in v0.6.1
func (m CocoapodsModule) Package() string
Package returns the package spec for CocoapodsModule
func (CocoapodsModule) Revision ¶ added in v0.6.1
func (m CocoapodsModule) Revision() string
Revision returns the version spec for CocoapodsModule
type ComposerBuilder ¶
type ComposerBuilder struct { PHPCmd string PHPVersion string ComposerCmd string ComposerVersion string }
ComposerBuilder implements Builder for Composer (composer.json) builds
func (*ComposerBuilder) Analyze ¶
func (builder *ComposerBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze parses the output of `composer show -f json --no-ansi`
func (*ComposerBuilder) Build ¶
func (builder *ComposerBuilder) Build(m module.Module, force bool) error
Build runs `composer install --prefer-dist --no-dev` and cleans with `rm -rf vendor`
func (*ComposerBuilder) DiscoverModules ¶
func (builder *ComposerBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules finds composer.json modules not a /vendor/ folder
func (*ComposerBuilder) Initialize ¶
func (builder *ComposerBuilder) Initialize() error
Initialize collects metadata on PHP and Composer binaries
type GoBuilder ¶
type GoBuilder struct { GoCmd string GoVersion string // dep DepCmd string DepVersion string // glide GlideCmd string GlideVersion string // godep GodepCmd string GodepVersion string // govendor GovendorCmd string GovendorVersion string // vndr VndrCmd string VndrVersion string // gdm GdmCmd string GdmVersion string }
GoBuilder implements Builder for Golang projects
func (*GoBuilder) Analyze ¶
func (builder *GoBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze traces imports and then looks up revisions in lockfiles
func (*GoBuilder) DiscoverModules ¶
DiscoverModules walks subdirectories for a Go file with `package main`.
func (*GoBuilder) Initialize ¶
Initialize collects metadata on Go, Dep, Glide, Godep, Govendor, and Vndr binaries.
type GradleBuilder ¶ added in v0.4.1
GradleBuilder implements Builder for build.gradle builds
func (*GradleBuilder) Analyze ¶ added in v0.4.1
func (builder *GradleBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze parses the output of `gradle -q app:dependencies`
func (*GradleBuilder) Build ¶ added in v0.4.1
func (builder *GradleBuilder) Build(m module.Module, force bool) error
Build is not implemented
func (*GradleBuilder) DiscoverModules ¶ added in v0.4.1
func (builder *GradleBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules finds either a root build.gradle file in the specified dir
func (*GradleBuilder) Initialize ¶ added in v0.4.1
func (builder *GradleBuilder) Initialize() error
Initialize collects metadata on Java and Maven binaries
type MavenArtifact ¶
MavenArtifact implements Dependency for Maven builds
func (MavenArtifact) Dependencies ¶ added in v0.6.1
func (m MavenArtifact) Dependencies() []module.Dependency
Dependencies is not implemented for MavenArtifact
func (MavenArtifact) Fetcher ¶
func (m MavenArtifact) Fetcher() string
Fetcher always returns mvn for MavenArtifact
func (MavenArtifact) Package ¶
func (m MavenArtifact) Package() string
Package returns the package spec for MavenArtifact
func (MavenArtifact) Revision ¶
func (m MavenArtifact) Revision() string
Revision returns the version spec for MavenArtifact
type MavenBuilder ¶
MavenBuilder implements Builder for Apache Maven (*.pom.xml) builds
func (*MavenBuilder) Analyze ¶
func (builder *MavenBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze parses the output of `mvn dependency:list`
func (*MavenBuilder) Build ¶
func (builder *MavenBuilder) Build(m module.Module, force bool) error
Build runs `mvn install -DskipTests -Drat.skip=true` and cleans with `mvn clean`
func (*MavenBuilder) DiscoverModules ¶
func (builder *MavenBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules finds either a root pom.xml file or all pom.xmls in the specified dir
func (*MavenBuilder) Initialize ¶
func (builder *MavenBuilder) Initialize() error
Initialize collects metadata on Java and Maven binaries
type NodeJSBuilder ¶
type NodeJSBuilder struct { NodeCmd string NodeVersion string NPMCmd string NPMVersion string YarnCmd string YarnVersion string }
NodeJSBuilder implements Builder for Nodejs. These properties are public for the sake of serialization.
func (*NodeJSBuilder) Analyze ¶
func (builder *NodeJSBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze runs and parses `npm ls --json`.
func (*NodeJSBuilder) Build ¶
func (builder *NodeJSBuilder) Build(m module.Module, force bool) error
Build runs either `yarn install --production --frozen-lockfile` or `npm install --production` and cleans with `rm -rf node_modules`
func (*NodeJSBuilder) DiscoverModules ¶
func (builder *NodeJSBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules builds ModuleConfigs for any package.jsons that are not contained in a node_modules dir
func (*NodeJSBuilder) Initialize ¶
func (builder *NodeJSBuilder) Initialize() error
Initialize collects metadata on Node, NPM, and Yarn binaries
type NuGetBuilder ¶ added in v0.5.0
type NuGetBuilder struct { DotNETCmd string DotNETVersion string NuGetCmd string NuGetVersion string }
NuGetBuilder implements Builder for Bundler (Gemfile) builds
func (*NuGetBuilder) Analyze ¶ added in v0.5.0
func (builder *NuGetBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze parses the output of NuGet lockfiles and falls back to parsing the packages folder
func (*NuGetBuilder) Build ¶ added in v0.5.0
func (builder *NuGetBuilder) Build(m module.Module, force bool) error
Build runs `dotnet restore` and falls back to `nuget restore`
func (*NuGetBuilder) DiscoverModules ¶ added in v0.5.0
func (builder *NuGetBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules returns ModuleConfigs that match `packages.config` in the directory
func (*NuGetBuilder) Initialize ¶ added in v0.5.0
func (builder *NuGetBuilder) Initialize() error
Initialize collects metadata on NuGet and NuGet environments
type POMFile ¶
type POMFile struct { XMLName xml.Name `xml:"project"` ArtifactID string `xml:"artifactId"` GroupID string `xml:"groupId"` Version string `xml:"version"` Description string `xml:"description"` Name string `xml:"name"` URL string `xml:"url"` }
POMFile represents the schema of a common pom.xml file
type PipBuilder ¶ added in v0.5.0
type PipBuilder struct { PythonCmd string PythonVersion string PipCmd string PipVersion string Virtualenv string }
PipBuilder implements Builder for Pip. These properties are public for the sake of serialization.
func (*PipBuilder) Analyze ¶ added in v0.5.0
func (builder *PipBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze runs `pipdeptree.py` in the current environment
func (*PipBuilder) Build ¶ added in v0.5.0
func (builder *PipBuilder) Build(m module.Module, force bool) error
Build runs `pip install -r requirements.txt`
func (*PipBuilder) DiscoverModules ¶ added in v0.5.0
func (builder *PipBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules builds ModuleConfigs for any `requirements.txt` files
func (*PipBuilder) Initialize ¶ added in v0.5.0
func (builder *PipBuilder) Initialize() error
Initialize collects metadata on Python and Pip binaries
type PodFileLock ¶ added in v0.6.1
type PodFileLock struct { Pods []interface{} `yaml:"PODS,omitempty"` // transitive deps + path Dependencies []string `yaml:"DEPENDENCIES,omitempty"` // top level deps CheckoutOptions map[string]map[string]string `yaml:"CHECKOUT OPTIONS,omitempty"` }
PodFileLock models Podfile.lock yaml file
Note: we set Pods to `[]interface{}` because Golang doesn't support ADT's. The PODS section of Podfile.lock is actually [](map[string][]string | string)
type RubyBuilder ¶
type RubyBuilder struct { BundlerCmd string BundlerVersion string GemCmd string GemVersion string RubyCmd string RubyVersion string }
RubyBuilder implements Builder for Bundler (Gemfile) builds
func (*RubyBuilder) Analyze ¶
func (builder *RubyBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze parses a `Gemfile.lock`
func (*RubyBuilder) Build ¶
func (builder *RubyBuilder) Build(m module.Module, force bool) error
Build runs `bundler install --deployment --frozen` and cleans with `rm Gemfile.lock`
func (*RubyBuilder) DiscoverModules ¶
func (builder *RubyBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules returns ModuleConfigs that match Gemfiles in the directory
func (*RubyBuilder) Initialize ¶
func (builder *RubyBuilder) Initialize() error
Initialize collects metadata on Ruby, Gem, and Bundler binaries
type SBTBuilder ¶
SBTBuilder implements build context for SBT builds
func (*SBTBuilder) Analyze ¶
func (builder *SBTBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze parses the output of `sbt -no-colors dependencyTree`
func (*SBTBuilder) Build ¶
func (builder *SBTBuilder) Build(m module.Module, force bool) error
Build runs `sbt compile` and cleans with `sbt clean`
func (*SBTBuilder) DiscoverModules ¶
func (builder *SBTBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules returns a root build.sbt if found, and build configs for all sub-projects otherwise
func (*SBTBuilder) Initialize ¶
func (builder *SBTBuilder) Initialize() error
Initialize collects metadata on Java and SBT binaries
type VendoredArchiveBuilder ¶
VendoredArchiveBuilder implements Builder for projects that have archive-formatted rawDependencies encapsulating another supported build system
func (*VendoredArchiveBuilder) Analyze ¶
func (builder *VendoredArchiveBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
Analyze scans for archives and inspects them
func (*VendoredArchiveBuilder) Build ¶
func (builder *VendoredArchiveBuilder) Build(m module.Module, force bool) error
Build does nothing for VendoredArchives
func (*VendoredArchiveBuilder) DiscoverModules ¶
func (builder *VendoredArchiveBuilder) DiscoverModules(dir string) ([]module.Config, error)
DiscoverModules is not implemented for VendoredArchiveBuilder, instead it must be explicitly configured
func (*VendoredArchiveBuilder) Initialize ¶
func (builder *VendoredArchiveBuilder) Initialize() error
Initialize gathers environment context.