objects

package
v0.0.0-...-813e729 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToStabilityGroup

func ToStabilityGroup(stability float64) string

Types

type ChartData

type ChartData struct {
	X       template.JS
	YAxis   string
	Y       template.JS
	Type    string
	Name    string
	PieData []PieRow
}

type Date

type Date struct {
	Year  int
	Month time.Month
	Day   int
}

func (Date) String

func (date Date) String() string

type DateCount

type DateCount struct {
	Date  time.Time
	Count int
}

type DateCounts

type DateCounts []DateCount

func (DateCounts) Len

func (d DateCounts) Len() int

func (DateCounts) Less

func (d DateCounts) Less(i, j int) bool

func (DateCounts) Swap

func (d DateCounts) Swap(i, j int)

type Dates

type Dates []Date

func (Dates) Len

func (dates Dates) Len() int

func (Dates) Less

func (dates Dates) Less(i, j int) bool

func (Dates) Swap

func (dates Dates) Swap(i, j int)

type FunctionHistory

type FunctionHistory struct {
	History         []*HistoryElement
	LifeTime        int
	EditLifeTime    int
	FirstAppearance time.Time
	LastAppearance  time.Time
	Deleted         bool

	ID          string
	Elements    map[string]*HistoryElement
	First, Last *HistoryElement
	// contains filtered or unexported fields
}

func NewFunctionHistory

func NewFunctionHistory(id string) *FunctionHistory

func (*FunctionHistory) AddElement

func (fh *FunctionHistory) AddElement(decl *ast.FuncDecl, commit *object.Commit, body []byte, simple bool) bool

func (*FunctionHistory) Delete

func (fh *FunctionHistory) Delete(commit *object.Commit)

func (*FunctionHistory) PostProcess

func (fh *FunctionHistory) PostProcess()

func (*FunctionHistory) VersionsCount

func (fh *FunctionHistory) VersionsCount() int

type History

type History struct {
	Data            map[string]*FunctionHistory
	CommitsAnalyzed int32
	MaxChanged      int32
	CountPerCommit  map[time.Time]int
	// contains filtered or unexported fields
}

func NewHistory

func NewHistory() *History

func (*History) ChartsData

func (history *History) ChartsData() map[string]ChartData

func (*History) CheckForDeleted

func (history *History) CheckForDeleted(commit *object.Commit)

func (*History) Get

func (history *History) Get(funcID string) *FunctionHistory

func (*History) Mark

func (history *History) Mark(sha time.Time, count int)

func (*History) Stats

func (history *History) Stats() map[string]interface{}

type HistoryElement

type HistoryElement struct {
	Commit *object.Commit
	Func   *ast.FuncDecl
	Text   string
	Offset int
	New    bool

	Parent   map[string]*HistoryElement
	Children map[string]*HistoryElement
}

type PieRow

type PieRow struct {
	Name  string
	Value int
}

func PieRowsFromMap

func PieRowsFromMap(m map[string]int) (rows []PieRow)

type Variable

type Variable struct {
	Name *ast.Ident
	Type ast.Expr
	Expr ast.Expr
}

Jump to

Keyboard shortcuts

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