model

package
v0.0.0-...-2200605 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotate

type Annotate interface {
	File(file *File) *FileAnnotation
	Line(line *Line) *LineAnnotation
}

func NewAnnotate

func NewAnnotate(server work.ItemServer) Annotate

func NewCachingAnnotate

func NewCachingAnnotate(annotate Annotate) Annotate

type Annotation

type Annotation interface {
	GetCommits() git.Commits
	GetWorkItems() []*work.FetchedItem
	GetContributors() git.Contributors
	GetTitle() string
}

type File

type File struct {
	RelPath string
	Name    string
	Start   int
	End     int
	Lines   []*Line
}

func NewFile

func NewFile(filename string, start, end int) (*File, error)

func (*File) GetLine

func (f *File) GetLine(lineNumber int) *Line

func (*File) Len

func (f *File) Len() int

type FileAnnotation

type FileAnnotation struct {
	File *File
	// contains filtered or unexported fields
}

func (FileAnnotation) GetCommits

func (a FileAnnotation) GetCommits() git.Commits

func (FileAnnotation) GetContributors

func (a FileAnnotation) GetContributors() git.Contributors

func (*FileAnnotation) GetTitle

func (f *FileAnnotation) GetTitle() string

func (FileAnnotation) GetWorkItems

func (a FileAnnotation) GetWorkItems() []*work.FetchedItem

type Line

type Line struct {
	File   *File
	Text   string
	Number int
}

func (Line) String

func (l Line) String() string

type LineAnnotation

type LineAnnotation struct {
	Start int
	End   int
	Line  *Line
	// contains filtered or unexported fields
}

func (LineAnnotation) GetCommits

func (a LineAnnotation) GetCommits() git.Commits

func (LineAnnotation) GetContributors

func (a LineAnnotation) GetContributors() git.Contributors

func (*LineAnnotation) GetTitle

func (l *LineAnnotation) GetTitle() string

func (LineAnnotation) GetWorkItems

func (a LineAnnotation) GetWorkItems() []*work.FetchedItem

Jump to

Keyboard shortcuts

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