Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PersonalDeletionTotalMetricName = "personal_deletion_total" PersonalDeletionTotalMetricHelp = "personal deletion total for repo" )
Functions ¶
func IsValidBranch ¶
Types ¶
type Collector ¶
func NewCollector ¶
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric)
func (*Collector) Describe ¶
func (c *Collector) Describe(ch chan<- *prometheus.Desc)
func (*Collector) IterateRepos ¶
func (c *Collector) IterateRepos(req apistructs.GittarListRepoRequest) ([]*PersonalMetric, error)
func (*Collector) RefreshPersonalContributions ¶
type MetricField ¶
type MetricField struct { CalculatedAt time.Time // Historical cumulative total CommitTotal uint64 FileChangeTotal uint64 AdditionTotal uint64 DeletionTotal uint64 // The cumulative total within a certain duration DurationCommitTotal uint64 DurationFileChangeTotal uint64 DurationAdditionTotal uint64 DurationDeletionTotal uint64 }
type PersonalMetric ¶
type PersonalMetric struct { UserName string UserEmail string RepoID uint64 Repo string ProjectID uint64 AppID uint64 ProjectName string AppName string OrgID uint64 OrgName string Field *MetricField }
func NewPersonalMetric ¶
func NewPersonalMetric(author *gitmodule.Signature, repo *models.Repo) *PersonalMetric
Click to show internal directories.
Click to hide internal directories.