Documentation ¶
Index ¶
- Constants
- type Extractor
- func (ex *Extractor) Configure(facts map[string]interface{}) error
- func (ex *Extractor) Consume(deps map[string]interface{}) (map[string]interface{}, error)
- func (ex *Extractor) Fork(n int) []core.PipelineItem
- func (ex *Extractor) Initialize(repository *git.Repository) error
- func (ex *Extractor) ListConfigurationOptions() []core.ConfigurationOption
- func (ex *Extractor) Name() string
- func (ex *Extractor) Provides() []string
- func (ex *Extractor) Requires() []string
Constants ¶
const ( // DependencyImports is the name of the dependency provided by Extractor. DependencyImports = "imports" // ConfigImportsGoroutines is the name of the configuration option for // Extractor.Configure() to set the number of parallel goroutines for imports extraction. ConfigImportsGoroutines = "Imports.Goroutines" // ConfigMaxFileSize is the name of the configuration option for // Extractor.Configure() to set the file size threshold after which they are ignored. ConfigMaxFileSize = "Imports.MaxFileSize" // DefaultMaxFileSize is the default value for Extractor.MaxFileSize. DefaultMaxFileSize = 1 << 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct { core.NoopMerger // Goroutines is the number of goroutines to run for imports extraction. Goroutines int // MaxFileSize is the file size threshold. Files that exceed it are ignored. MaxFileSize int // contains filtered or unexported fields }
Extractor reports the imports in the changed files.
func (*Extractor) Configure ¶
Configure sets the properties previously published by ListConfigurationOptions().
func (*Extractor) Consume ¶
Consume runs this PipelineItem on the next commit data. `deps` contain all the results from upstream PipelineItem-s as requested by Requires(). Additionally, DependencyCommit is always present there and represents the analysed *object.Commit. This function returns the mapping with analysis results. The keys must be the same as in Provides(). If there was an error, nil is returned.
func (*Extractor) Fork ¶
func (ex *Extractor) Fork(n int) []core.PipelineItem
Fork clones this PipelineItem.
func (*Extractor) Initialize ¶
Initialize resets the temporary caches and prepares this PipelineItem for a series of Consume() calls. The repository which is going to be analysed is supplied as an argument.
func (*Extractor) ListConfigurationOptions ¶
func (ex *Extractor) ListConfigurationOptions() []core.ConfigurationOption
ListConfigurationOptions returns the list of changeable public properties of this PipelineItem.
func (*Extractor) Name ¶
Name of this PipelineItem. Uniquely identifies the type, used for mapping keys, etc.