reports

package
v2.1.155 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProjectHistoryService

func NewProjectHistoryService(fileName string) (*ProjectHistoryService, *ProjectHistory, error)

func ReportAddNumber

func ReportAddNumber(report BarReport, name string, value int)

Types

type BarReport

type BarReport interface {
	AddText(name string, value string)
	AddNumber(name string, value int)

	Render() error
}

type BlogBarReport

type BlogBarReport struct {
	Name       string
	BlogWriter io.Writer
	JSFileName string
	JSLinkURI  string
	// contains filtered or unexported fields
}

func NewBlogBarReport

func NewBlogBarReport(name string, blogWriter io.Writer, jsFileName string, jsLinkURI string) *BlogBarReport

func (*BlogBarReport) AddNumber

func (r *BlogBarReport) AddNumber(name string, value int)

func (*BlogBarReport) AddText

func (r *BlogBarReport) AddText(name string, value string)

func (*BlogBarReport) Render

func (r *BlogBarReport) Render() error

type CountMetrics

type CountMetrics struct {
	Count int `json:"count,omitempty"`
	Total int `json:"total,omitempty"`
}

type ProjectHistory

type ProjectHistory struct {
	LastReportDate string           `json:"lastReportDate,omitempty"`
	Reports        []*ProjectReport `json:"reports,omitempty"`
	Contributors   []string         `json:"contributors,omitempty"`
	Committers     []string         `json:"committers,omitempty"`
}

func (*ProjectHistory) CommitMetrics

func (h *ProjectHistory) CommitMetrics(reportDate string, total int) *ProjectReport

func (*ProjectHistory) DeveloperChatMetrics

func (h *ProjectHistory) DeveloperChatMetrics(reportDate string, total int) *ProjectReport

func (*ProjectHistory) DownloadMetrics

func (h *ProjectHistory) DownloadMetrics(reportDate string, total int) *ProjectReport

func (*ProjectHistory) FindPreviousReport

func (h *ProjectHistory) FindPreviousReport(reportDate string) *ProjectReport

func (*ProjectHistory) FindReport

func (h *ProjectHistory) FindReport(reportDate string) *ProjectReport

func (*ProjectHistory) GetOrCreateReport

func (h *ProjectHistory) GetOrCreateReport(reportDate string) *ProjectReport

func (*ProjectHistory) IssueMetrics

func (h *ProjectHistory) IssueMetrics(reportDate string, total int) *ProjectReport

func (*ProjectHistory) NewCommitterMetrics

func (h *ProjectHistory) NewCommitterMetrics(reportDate string, total int) *ProjectReport

func (*ProjectHistory) NewContributorMetrics

func (h *ProjectHistory) NewContributorMetrics(reportDate string, total int) *ProjectReport

func (*ProjectHistory) PullRequestMetrics

func (h *ProjectHistory) PullRequestMetrics(reportDate string, total int) *ProjectReport

func (*ProjectHistory) StarsMetrics

func (h *ProjectHistory) StarsMetrics(reportDate string, total int) *ProjectReport

func (*ProjectHistory) UserChatMetrics

func (h *ProjectHistory) UserChatMetrics(reportDate string, total int) *ProjectReport

type ProjectHistoryService

type ProjectHistoryService struct {
	FileName string
	// contains filtered or unexported fields
}

func (*ProjectHistoryService) History

func (s *ProjectHistoryService) History() *ProjectHistory

func (*ProjectHistoryService) LoadHistory

func (s *ProjectHistoryService) LoadHistory() (*ProjectHistory, error)

LoadHistory loads the project history from disk if it exists

func (*ProjectHistoryService) SaveHistory

func (s *ProjectHistoryService) SaveHistory() error

SaveHistory saves the history to disk

type ProjectReport

type ProjectReport struct {
	ReportDate            string       `json:"reportDate,omitempty"`
	StarsMetrics          CountMetrics `json:"starsMetrics,omitempty"`
	DownloadMetrics       CountMetrics `json:"downloadMetrics,omitempty"`
	IssueMetrics          CountMetrics `json:"issueMetrics,omitempty"`
	PullRequestMetrics    CountMetrics `json:"pullRequestMetrics,omitempty"`
	CommitMetrics         CountMetrics `json:"commitMetrics,omitempty"`
	NewCommitterMetrics   CountMetrics `json:"newCommitterMetrics,omitempty"`
	NewContributorMetrics CountMetrics `json:"newContributorMetrics,omitempty"`
	DeveloperChatMetrics  CountMetrics `json:"developerChatMetrics,omitempty"`
	UserChatMetrics       CountMetrics `json:"userChatMetrics,omitempty"`
}

type TableBarReport

type TableBarReport struct {
	Table table.Table
}

func NewTableBarReport

func NewTableBarReport(table table.Table, legends ...string) *TableBarReport

func (*TableBarReport) AddNumber

func (t *TableBarReport) AddNumber(name string, value int)

func (*TableBarReport) AddText

func (t *TableBarReport) AddText(name string, value string)

func (*TableBarReport) Render

func (t *TableBarReport) Render() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL