Documentation
¶
Overview ¶
Commit represents a base commit, which is used by output html file directly and indirectly
DailyCommit represents number of commits aggregated by day.
Committer represents number of commits aggregated by Email.
Fetch data via Github API wrapper and convert it to GhAPI.
Issue represents a base issue, which is used by output html file directly and indirectly
FirstIssue indicate issues that has 'good first issue' 'first-timers-only' 'beginner' 'easy' or 'dificulty:easy' label and not closed
IssueStack represent cumulative sum of issue
Index ¶
- func GetClient() *github.Client
- func GetRepository(user string, repo string, r *Insight)
- func Parse(api GhAPI, r *Insight)
- type Commit
- type Commits
- type Committer
- type Committers
- type DailyCommit
- type DailyCommits
- type GhAPI
- func (c *GhAPI) FetchContent(user string, repo string, file string) *github.RepositoryContent
- func (c *GhAPI) FetchIssues(user string, repo string, opts *github.IssueListByRepoOptions) []*github.Issue
- func (c *GhAPI) FetchLanguages(user string, repo string) map[string]int
- func (c *GhAPI) FetchRateLimit() *github.RateLimits
- func (c *GhAPI) FetchRepoCommits(user string, repo string, opts *github.CommitsListOptions) []*github.RepositoryCommit
- func (c *GhAPI) FetchRepository(user string, repo string) *github.Repository
- type I
- type Info
- type Insight
- type Issue
- type IssueStack
- type Issues
- type Language
- type Languages
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRepository ¶
Types ¶
type Commit ¶
type Commits ¶
type Commits []Commit
func NewCommits ¶
func NewCommits(rc []*github.RepositoryCommit) (Commits, int)
type Committers ¶
type Committers []Committer
func NewCommitters ¶
func NewCommitters(cl Commits) Committers
func (Committers) Len ¶
func (c Committers) Len() int
func (Committers) Less ¶
func (c Committers) Less(i, j int) bool
func (Committers) String ¶
func (c Committers) String() string
func (Committers) Swap ¶
func (c Committers) Swap(i, j int)
type DailyCommit ¶
func NewDailyCommit ¶
func NewDailyCommit(Amount int, Datetime string) DailyCommit
type DailyCommits ¶
type DailyCommits []DailyCommit
func NewDailyCommits ¶
func NewDailyCommits(cl Commits) (DailyCommits, []string)
func (DailyCommits) Len ¶
func (ca DailyCommits) Len() int
func (DailyCommits) Less ¶
func (ca DailyCommits) Less(i, j int) bool
func (DailyCommits) String ¶
func (c DailyCommits) String() string
func (DailyCommits) Swap ¶
func (ca DailyCommits) Swap(i, j int)
type GhAPI ¶
type GhAPI struct { RepoCommit []*github.RepositoryCommit RepoLang map[string]int RateLimit *github.RateLimits RepoInfo *github.Repository RepoAllIss []*github.Issue RepoOpenIss []*github.Issue Readme *github.RepositoryContent Contributing *github.RepositoryContent }
func (*GhAPI) FetchContent ¶
func (*GhAPI) FetchIssues ¶
func (*GhAPI) FetchLanguages ¶
func (*GhAPI) FetchRateLimit ¶
func (c *GhAPI) FetchRateLimit() *github.RateLimits
func (*GhAPI) FetchRepoCommits ¶
func (c *GhAPI) FetchRepoCommits(user string, repo string, opts *github.CommitsListOptions) []*github.RepositoryCommit
func (*GhAPI) FetchRepository ¶
func (c *GhAPI) FetchRepository(user string, repo string) *github.Repository
type I ¶
type I interface { FetchRepoCommits(string, string, *github.CommitsListOptions) []*github.RepositoryCommit FetchLanguages(string, string) map[string]int FetchRateLimit() *github.RateLimits FetchRepository(string, string) *github.Repository FetchIssues(string, string, *github.IssueListByRepoOptions) []*github.Issue FetchContent(string, string, string) *github.RepositoryContent }
type Info ¶
type Info struct { Name string AvatarURL string Language string Description string HomePage string License string LicenseURL string Stars int Forks int IsFork bool Size int Issues int CreatedAt string UpdatedAt string }
func NewInfo ¶
func NewInfo(r *github.Repository) Info
type Insight ¶
type Insight struct { User string RepoName string Author []string Info Info RateLimits *github.RateLimits GeneratedAt string CommitCount int IssueCount int Languages Languages Committers Committers DailyCommits DailyCommits LatestCommit Commits LatestIssues Issues FirstIssues Issues FirstIssueCount int IssueStack IssueStack Readme string Contributing string }
type Issue ¶
type Issue struct { Title string URL string User string UserURL string AvatarURL string Label map[string]string State string CreatedAt string ClosedAt string Body string }
TODO: make namespace match the Commit one
type IssueStack ¶
func NewIssueStack ¶
func NewIssueStack(repoIss []*github.Issue) IssueStack
Click to show internal directories.
Click to hide internal directories.