Documentation
¶
Index ¶
- func CreateCommits(commits []Commit)
- func FindRepoByName(name string) (bool, error)
- func GetCommitsByRepoName(repo string) ([]map[string]interface{}, error)
- func GetTopNCommitAuthors(repo string, topN int) ([]map[string]interface{}, error)
- func SetEnvSetupData()
- type Commit
- type Repository
- type SetupData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCommits ¶
func CreateCommits(commits []Commit)
func FindRepoByName ¶
func GetCommitsByRepoName ¶
func GetTopNCommitAuthors ¶
func SetEnvSetupData ¶
func SetEnvSetupData()
Types ¶
type Commit ¶
type Commit struct {
ID int `json:"id"`
SHA string `json:"sha"`
Repo string `json:"repo"` // corresponds to the repo full name
RepoInfo Repository `json:"repo_info"`
AuthorName string `json:"author_name"`
AuthorEmail string `json:"author_email"`
URL string `json:"url"`
Message string `json:"message"`
Date time.Time `json:"date"`
}
func (*Commit) FindLatestRepoCommitByDate ¶
type Repository ¶
type Repository struct {
ID int `json:"id"`
Name string `json:"name"` // repo full name
Description string `json:"description"`
URL string `json:"url"`
Language string `json:"language"`
ForksCount float64 `json:"forks_count"`
StarsCount float64 `json:"stars_count"`
OpenIssuesCount float64 `json:"open_issues_count"`
WatchersCount float64 `json:"watchers_count"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*Repository) Create ¶
func (r *Repository) Create() error
Click to show internal directories.
Click to hide internal directories.