Documentation ¶
Overview ¶
Package collector provides structs for collecting stats about contributions to git base repositories.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CollectReport ¶
type CollectReport struct { Repos []*RepoResults `json:"repos,omitempty"` Commits int64 `json:"commits"` Lines int64 `json:"lines"` Projects int64 `json:"projects"` }
CollectReport contains the results of an entire collection of repos, and an aggregated value of each stats
type Collector ¶
type Collector interface { // Collects stats from the API, and returns the values as a []byte of JSON content Collect() (stats *CollectReport, err error) }
Collector is a simple interface for git repo collectors for that return stats.
type GitHubCloneCollector ¶
type GitHubCloneCollector struct {
// contains filtered or unexported fields
}
GitHubCloneCollector uses offline caching of repos to obtain stats of contribution by members and domains of interest
func NewGitHubCloneCollector ¶
func NewGitHubCloneCollector(contants config.Config, c cache.Cache) (ghc *GitHubCloneCollector)
NewGitHubCloneCollector returns a GitHubCloneCollector.
func (*GitHubCloneCollector) Collect ¶
func (ghc *GitHubCloneCollector) Collect() (stats *CollectReport, err error)
Collect iterates over all members in the organization to aggregate their OpenSource contributions offline
type RepoResults ¶
type RepoResults struct { Repo string `json:"repo"` Commits int64 `json:"commits"` Lines int64 `json:"lines"` }
RepoResults contains results from an individual repository
Click to show internal directories.
Click to hide internal directories.