Documentation ¶
Overview ¶
Package client contains all the files to extract the information from gitlab
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalStats ¶ added in v0.0.3
ApprovalStats is the struct for Gitlab Approvals data we want
type ChangeStats ¶ added in v0.0.8
ChangeStats is the struct for the total amount of changes within a MR.
type ExporterClient ¶
type ExporterClient struct {
// contains filtered or unexported fields
}
ExporterClient contains Gitlab information for connecting
func New ¶
func New(c internal.Config) *ExporterClient
New returns a new Client connection to Gitlab.
func (*ExporterClient) GetStats ¶
func (c *ExporterClient) GetStats() (*Stats, error)
GetStats retrieves data from API to create metrics from.
type MergeClosedStats ¶ added in v0.0.4
type MergeClosedStats struct { MergeRequest MergeRequestStats ClosedAt *time.Time Duration float64 }
MergeClosedStats is the struct for closed merge requests
type MergeMergedStats ¶ added in v0.0.4
type MergeMergedStats struct { MergeRequest MergeRequestStats MergedAt *time.Time Duration float64 }
MergeMergedStats is the strucct for merged merge requests
type MergeRequestStats ¶
type MergeRequestStats struct { ID string InternalID int State string TargetBranch string SourceBranch string ProjectID string ChangeCount string Title string LastUpdated *time.Time CreatedAt *time.Time Assignees int }
MergeRequestStats is the base struct for Gitlab Merge Requests data we want
type ProjectStats ¶
ProjectStats is the struct for Gitlab projects data we want.
type Stats ¶
type Stats struct { Projects *[]ProjectStats MergeRequests *[]MergeRequestStats MergeRequestsOpen *[]MergeRequestStats MergeRequestsClosed *[]MergeClosedStats MergeRequestsMerged *[]MergeMergedStats Approvals *[]ApprovalStats Changes *[]ChangeStats }
Stats struct is the list of expected to results to export.
var CachedStats *Stats = &Stats{ Projects: &[]ProjectStats{}, MergeRequests: &[]MergeRequestStats{}, MergeRequestsOpen: &[]MergeRequestStats{}, MergeRequestsClosed: &[]MergeClosedStats{}, MergeRequestsMerged: &[]MergeMergedStats{}, Approvals: &[]ApprovalStats{}, Changes: &[]ChangeStats{}, }
CachedStats is to store scraped data for caching purposes.