Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCloningRepository indicates that an error occurred while retrieving the remote Github.com repository. ErrCloningRepository = errors.New("Error while reading/cloning remote repository") // ErrParsingFile indicates an error while converting the source code to its Abstract Syntax Tree representation. ErrParsingFile = errors.New("Error while parsing source code to AST") )
Functions ¶
This section is empty.
Types ¶
type Cloner ¶
type Cloner interface { // Clone accesses a repository and clones it. Clone(url string) (Repository, error) // Filenames retrieves the names of the existing files on a repository. Filenames() ([]string, error) // File provides the bytes representation of a given file. File(name string) ([]byte, error) }
Cloner interface is used to define a custom cloner.
type File ¶
File represents a file on a code.Repository, and contains a raw representation and a ast.File representation.
type Miner ¶
type Miner interface { // Name provides the name of the miner. Name() string // Visit applies the mining logic while traversing the Abstract Syntax Tree. Visit(node ast.Node) ast.Visitor // Results provides the mining results. Results() map[string]int }
Miner interface is used to define a custom miner.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor handles the logic to extract the word count from a remote source code repository.
func NewProcessor ¶
func NewProcessor(config ProcessorConfig) Processor
NewProcessor creates a new Processor based on the provided configuration.
type ProcessorConfig ¶
ProcessorConfig defines the properties available for configuration for a Processor.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.