Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct {
Username string `json:"username"`
Reputation float64 `json:"reputation"`
Context map[string]interface{} `json:"context,omitempty"`
Stats *Stats `json:"stats,omitempty"`
}
Author represents a commit author.
func MakeAuthor ¶
MakeAuthor creates a new Author instance.
type Query ¶ added in v0.1.0
type Query struct {
// Repo is the repo to query (required).
Repo string
// Commit is the commit to query (optional).
Commit string
// File is the file to write the report to (optional).
Stats bool
// Kind is the kind of repo (e.g. github.com, gitlab.com, etc.).
// Will be parsed from Repo.
Kind string
// Owner is the owner of the repo.
// Will be parsed from Repo.
Owner string
// Name is the name of the repo.
// Will be parsed from Repo.
Name string
}
Query is a query for a repo and commit.
type Report ¶
type Report struct {
Repo string `json:"repo,omitempty"`
AtCommit string `json:"at_commit,omitempty"`
GeneratedOn time.Time `json:"generated_on,omitempty"`
TotalCommits int64 `json:"total_commits,omitempty"`
TotalContributors int64 `json:"total_contributors,omitempty"`
Contributors []*Author `json:"contributors,omitempty"`
}
func (*Report) SortAuthors ¶ added in v0.1.0
func (r *Report) SortAuthors()
SortAuthors sorts the authors by username.
type Stats ¶ added in v0.1.0
type Stats struct {
Suspended bool `json:"suspended,omitempty"`
CommitsVerified bool `json:"verified_commits,omitempty"`
StrongAuth bool `json:"strong_auth,omitempty"`
AgeDays int64 `json:"age_days"`
Commits int64 `json:"commits"`
UnverifiedCommits int64 `json:"unverified_commits"`
PublicRepos int64 `json:"public_repos,omitempty"`
PrivateRepos int64 `json:"private_repos,omitempty"`
Followers int64 `json:"followers,omitempty"`
Following int64 `json:"following,omitempty"`
}
Stats represents a set of statistics for an author.
Click to show internal directories.
Click to hide internal directories.