reports

package
v1.3.429 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2018 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 `yaml:"count,omitempty"`
	Total int `yaml:"total,omitempty"`
}

type ProjectHistory

type ProjectHistory struct {
	LastReportDate string           `yaml:"lastReportDate,omitempty"`
	Reports        []*ProjectReport `yaml:"reports,omitempty"`
	Contributors   []string         `yaml:"contributors,omitempty"`
	Committers     []string         `yaml:"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       `yaml:"reportDate,omitempty"`
	StarsMetrics          CountMetrics `yaml:"starsMetrics,omitempty"`
	DownloadMetrics       CountMetrics `yaml:"downloadMetrics,omitempty"`
	IssueMetrics          CountMetrics `yaml:"issueMetrics,omitempty"`
	PullRequestMetrics    CountMetrics `yaml:"pullRequestMetrics,omitempty"`
	CommitMetrics         CountMetrics `yaml:"commitMetrics,omitempty"`
	NewCommitterMetrics   CountMetrics `yaml:"newCommitterMetrics,omitempty"`
	NewContributorMetrics CountMetrics `yaml:"newContributorMetrics,omitempty"`
	DeveloperChatMetrics  CountMetrics `yaml:"developerChatMetrics,omitempty"`
	UserChatMetrics       CountMetrics `yaml:"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