53 lines
878 B
Go
53 lines
878 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type Repository struct {
|
|
ID int64
|
|
Name string
|
|
FullName string
|
|
HTMLURL string
|
|
Language string
|
|
Topics []string
|
|
}
|
|
|
|
type Commit struct {
|
|
SHA string
|
|
Message string
|
|
Author string
|
|
AuthorEmail string
|
|
Timestamp time.Time
|
|
RepoName string
|
|
}
|
|
|
|
type LanguageStats struct {
|
|
Language string
|
|
Count int
|
|
Percent float64
|
|
}
|
|
|
|
type DateStats struct {
|
|
Date time.Time
|
|
Count int
|
|
Day string
|
|
}
|
|
|
|
type TagStats struct {
|
|
Tag string
|
|
Count int
|
|
}
|
|
|
|
type UserStats struct {
|
|
Username string
|
|
TotalCommits int
|
|
TotalRepositories int
|
|
Languages []LanguageStats
|
|
Tags []TagStats
|
|
CommitsByWeekday []DateStats
|
|
CommitsByMonth []DateStats
|
|
TopRepositories []Repository
|
|
MostActiveMonth string
|
|
MostActiveDay string
|
|
AverageCommitsPerDay float64
|
|
}
|