Documentation ¶
Index ¶
- func CreateGitContributor(gitContributor *GitContributor) error
- func CreateGitContributors(gitContributors []*GitContributor) error
- func CreateGitRepo(gitRepo *GitRepo) error
- func CreateNodeRepo(nodeRepo *NodeRepo) error
- func SaveTask(task *Task) error
- type GitContributor
- type GitRepo
- type NodeRepo
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGitContributor ¶
func CreateGitContributor(gitContributor *GitContributor) error
func CreateGitContributors ¶
func CreateGitContributors(gitContributors []*GitContributor) error
func CreateGitRepo ¶
func CreateNodeRepo ¶
Types ¶
type GitContributor ¶
type GitContributor struct { Id uint64 `json:"id" db:"id" gorm:"primary_key;autoIncrement"` RepoId uint64 `json:"repo_id" db:"repo_id" gorm:"index"` Login string `json:"login" db:"login"` GitId int `json:"git_id" db:"git_id"` Contributions int `json:"contributions" db:"contributions"` Score float64 `json:"score" db:"score"` // contributons / total_contributions }
func GetAllGitContributors ¶
func GetAllGitContributors(repoIdList []uint64) ([]*GitContributor, error)
func GetGitContributorsByRepoId ¶
func GetGitContributorsByRepoId(repoId uint64) ([]*GitContributor, error)
func (*GitContributor) TableName ¶
func (g *GitContributor) TableName() string
type GitRepo ¶
type GitRepo struct { Id uint64 `json:"id" db:"id" gorm:"primary_key;autoIncrement"` Repo string `json:"repo" db:"repo" gorm:"uniqueIndex"` StarCount int `json:"star_count" db:"star_count"` ForkCount int `json:"fork_count" db:"fork_count"` ContributorCount int `json:"contributor_count" db:"contributor_count"` UpdatedAt time.Time `json:"update_at" db:"update_at"` }
func GetAllRepos ¶
func GetGitRepoByRepoName ¶
type NodeRepo ¶
type NodeRepo struct { Id uint64 `json:"id" db:"id" gorm:"primary_key;autoIncrement"` Pkg string `json:"pkg" db:"pkg" gorm:"uniqueIndex"` Repo string `json:"repo" db:"repo"` }
func GetNodeRepoByPkg ¶
type Task ¶
type Task struct { Id string `json:"id" db:"id" gorm:"primary_key;type:char(22)"` Lang string `json:"lang" db:"lang"` MinScore float64 `json:"min_score" db:"min_score"` Repos string `json:"repos" db:"repos"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
func GetTaskById ¶
Click to show internal directories.
Click to hide internal directories.