Documentation
¶
Index ¶
- type Blame
- type Changes
- type Class
- type Field
- type File
- type FileChangeType
- type FileContents
- type FileLine
- type FileLineType
- type Files
- func (fs *Files) GetFile(path string) *File
- func (fs *Files) GetFileByID(id UUID) *File
- func (fs *Files) GetOrCreateFile(path string) *File
- func (fs *Files) GetOrCreateFileEx(path string, id *UUID) *File
- func (fs *Files) GroupFilesByDirectory() map[UUID][]*File
- func (fs *Files) ListFiles() []*File
- func (fs *Files) ListFilesByProject(proj *Project) []*File
- func (fs *Files) ListFilesByProjects(ps []*Project) []*File
- type FilterType
- type Function
- type Metrics
- type MonthlyStats
- type MonthlyStatsLine
- type People
- func (ps *People) ChangePersonName(person *Person, name string)
- func (ps *People) GetOrCreatePerson(name string) *Person
- func (ps *People) GetOrCreatePersonEx(name string, id *UUID) *Person
- func (ps *People) GetOrCreateProductArea(name string) *ProductArea
- func (ps *People) GetOrCreateProductAreaEx(name string, id *UUID) *ProductArea
- func (ps *People) GetPerson(name string) *Person
- func (ps *People) GetPersonByID(id UUID) *Person
- func (ps *People) GetProductAreaByID(id UUID) *ProductArea
- func (ps *People) ListPeople() []*Person
- func (ps *People) ListProductAreas() []*ProductArea
- type PeopleRelations
- func (p *PeopleRelations) GetOrCreatePersonFile(personID UUID, fileID UUID) *PersonFile
- func (p *PeopleRelations) GetOrCreatePersonRepo(personID UUID, repoID UUID) *PersonRepository
- func (p *PeopleRelations) ListFiles() []*PersonFile
- func (p *PeopleRelations) ListFilesByPerson(personID UUID) map[UUID]*PersonFile
- func (p *PeopleRelations) ListPeopleByFile(fileID UUID) map[UUID]*PersonFile
- func (p *PeopleRelations) ListPeopleByRepo(repoID UUID) map[UUID]*PersonRepository
- func (p *PeopleRelations) ListReposByPerson(personID UUID) map[UUID]*PersonRepository
- func (p *PeopleRelations) ListRepositories() []*PersonRepository
- type Person
- type PersonFile
- type PersonRepository
- type ProductArea
- type Project
- func (p *Project) AddSize(name string, size *Size)
- func (p *Project) ClearSizes()
- func (p *Project) FullName() string
- func (p *Project) GetData(name string) string
- func (p *Project) GetDirectory(relativePath string) *ProjectDirectory
- func (p *Project) GetMetrics() *Metrics
- func (p *Project) GetOrCreateDependency(d *Project) *ProjectDependency
- func (p *Project) GetSizeOf(name string) *Size
- func (p *Project) IsCode() bool
- func (p *Project) IsExternalDependency() bool
- func (p *Project) IsIgnored() bool
- func (p *Project) LevelSimpleName(level int) string
- func (p *Project) ListDependencies(filter FilterType) []*ProjectDependency
- func (p *Project) SeenAt(ts ...time.Time)
- func (p *Project) SetData(name string, value string) bool
- func (p *Project) SimpleName() string
- func (p *Project) String() string
- type ProjectDependency
- type ProjectDirectory
- type ProjectDirectoryType
- type ProjectType
- type Projects
- func (ps *Projects) GetByID(id UUID) *Project
- func (ps *Projects) GetOrCreate(root, name string) *Project
- func (ps *Projects) GetOrCreateEx(root, name string, id *UUID) *Project
- func (ps *Projects) ListProjects(ft FilterType) []*Project
- func (ps *Projects) ListProjectsByRoot(root string, ft FilterType) []*Project
- type Repositories
- type Repository
- func (r *Repository) ContainsCommit(hash string) bool
- func (r *Repository) CountCommits() int
- func (r *Repository) GetCommit(hash string) *RepositoryCommit
- func (r *Repository) GetCommitByID(id UUID) *RepositoryCommit
- func (r *Repository) GetOrCreateCommit(hash string) *RepositoryCommit
- func (r *Repository) GetOrCreateCommitEx(hash string, id *UUID) *RepositoryCommit
- func (r *Repository) ListCommits() []*RepositoryCommit
- func (r *Repository) SeenAt(ts ...time.Time)
- type RepositoryCommit
- type RepositoryCommitFile
- type RepositoryCommitFiles
- type Size
- type UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Class ¶
type File ¶
type File struct {
Path string
ID UUID
ProjectID *UUID
ProjectDirectoryID *UUID
RepositoryID *UUID
ProductAreaID *UUID
Exists bool
Size *Size
Changes *Changes
Metrics *Metrics
Data map[string]string
FirstSeen time.Time
LastSeen time.Time
Classes map[string]*Class
Functions map[string]*Function
}
func (*File) GetOrCreateFunction ¶
type FileChangeType ¶
type FileChangeType int
const ( FileChangeUnknown FileChangeType = -1 FileModified FileChangeType = iota FileRenamed FileCreated FileDeleted )
type FileContents ¶
func NewFileContents ¶
func NewFileContents(fileID UUID) *FileContents
func (*FileContents) AppendLine ¶
func (fc *FileContents) AppendLine() *FileLine
type FileLineType ¶
type FileLineType int
const ( CodeFileLine FileLineType = iota CommentFileLine BlankFileLine )
type Files ¶
type Files struct {
// contains filtered or unexported fields
}
func (*Files) GetFileByID ¶
func (*Files) GetOrCreateFile ¶
func (*Files) GroupFilesByDirectory ¶
func (*Files) ListFilesByProject ¶
func (*Files) ListFilesByProjects ¶
type Function ¶
type Metrics ¶
type Metrics struct {
GuiceDependencies int
Abstracts int
CyclomaticComplexity int
CognitiveComplexity int
FocusedComplexity int
}
func NewMetrics ¶
func NewMetrics() *Metrics
type MonthlyStats ¶
type MonthlyStats struct {
// contains filtered or unexported fields
}
func NewMonthlyStats ¶
func NewMonthlyStats() *MonthlyStats
func (*MonthlyStats) GetOrCreateLines ¶
func (s *MonthlyStats) GetOrCreateLines(month string, repositoryID UUID, authorID UUID, committerID UUID, fileID UUID, projectID *UUID) *MonthlyStatsLine
func (*MonthlyStats) ListLines ¶
func (s *MonthlyStats) ListLines() []*MonthlyStatsLine
type MonthlyStatsLine ¶
type MonthlyStatsLine struct {
ID UUID
Month string
RepositoryID UUID
AuthorID UUID
CommitterID UUID
FileID UUID
ProjectID *UUID
Changes *Changes
Blame *Blame
}
func NewMonthlyStatsLine ¶
type People ¶
type People struct {
// contains filtered or unexported fields
}
func (*People) ChangePersonName ¶
func (*People) GetOrCreatePerson ¶
func (*People) GetOrCreatePersonEx ¶
func (*People) GetOrCreateProductArea ¶
func (ps *People) GetOrCreateProductArea(name string) *ProductArea
func (*People) GetOrCreateProductAreaEx ¶
func (ps *People) GetOrCreateProductAreaEx(name string, id *UUID) *ProductArea
func (*People) GetPersonByID ¶
func (*People) GetProductAreaByID ¶
func (ps *People) GetProductAreaByID(id UUID) *ProductArea
func (*People) ListPeople ¶
func (*People) ListProductAreas ¶
func (ps *People) ListProductAreas() []*ProductArea
type PeopleRelations ¶
type PeopleRelations struct {
// contains filtered or unexported fields
}
func NewPeopleRelations ¶
func NewPeopleRelations() *PeopleRelations
func (*PeopleRelations) GetOrCreatePersonFile ¶
func (p *PeopleRelations) GetOrCreatePersonFile(personID UUID, fileID UUID) *PersonFile
func (*PeopleRelations) GetOrCreatePersonRepo ¶
func (p *PeopleRelations) GetOrCreatePersonRepo(personID UUID, repoID UUID) *PersonRepository
func (*PeopleRelations) ListFiles ¶
func (p *PeopleRelations) ListFiles() []*PersonFile
func (*PeopleRelations) ListFilesByPerson ¶
func (p *PeopleRelations) ListFilesByPerson(personID UUID) map[UUID]*PersonFile
func (*PeopleRelations) ListPeopleByFile ¶
func (p *PeopleRelations) ListPeopleByFile(fileID UUID) map[UUID]*PersonFile
func (*PeopleRelations) ListPeopleByRepo ¶
func (p *PeopleRelations) ListPeopleByRepo(repoID UUID) map[UUID]*PersonRepository
func (*PeopleRelations) ListReposByPerson ¶
func (p *PeopleRelations) ListReposByPerson(personID UUID) map[UUID]*PersonRepository
func (*PeopleRelations) ListRepositories ¶
func (p *PeopleRelations) ListRepositories() []*PersonRepository
type Person ¶
type Person struct {
Name string
ID UUID
Blame *Blame
Changes *Changes
Data map[string]string
FirstSeen time.Time
LastSeen time.Time
// contains filtered or unexported fields
}
func (*Person) ListEmails ¶
type PersonFile ¶
func NewPersonFile ¶
func NewPersonFile(personID UUID, fileID UUID) *PersonFile
func (*PersonFile) SeenAt ¶
func (p *PersonFile) SeenAt(ts ...time.Time)
type PersonRepository ¶
type PersonRepository struct {
PersonID UUID
RepositoryID UUID
FirstSeen time.Time
LastSeen time.Time
}
func NewPersonRepository ¶
func NewPersonRepository(personID UUID, repositoryID UUID) *PersonRepository
func (*PersonRepository) SeenAt ¶
func (p *PersonRepository) SeenAt(ts ...time.Time)
type ProductArea ¶
type ProductArea struct {
Name string
ID UUID
Size *Size
Changes *Changes
Metrics *Metrics
Data map[string]string
}
func NewProductArea ¶
func NewProductArea(name string, id *UUID) *ProductArea
type Project ¶
type Project struct {
Root string
Name string
NameParts []string
Type ProjectType
ID UUID
RootDir string
ProjectFile string
RepositoryID *UUID
Dirs map[string]*ProjectDirectory
Dependencies map[string]*ProjectDependency
Sizes map[string]*Size
Size *Size
Changes *Changes
Metrics *Metrics
Data map[string]string
FirstSeen time.Time
LastSeen time.Time
}
func NewProject ¶
func (*Project) ClearSizes ¶
func (p *Project) ClearSizes()
func (*Project) GetDirectory ¶
func (p *Project) GetDirectory(relativePath string) *ProjectDirectory
func (*Project) GetMetrics ¶
func (*Project) GetOrCreateDependency ¶
func (p *Project) GetOrCreateDependency(d *Project) *ProjectDependency
func (*Project) IsExternalDependency ¶
func (*Project) LevelSimpleName ¶
func (*Project) ListDependencies ¶
func (p *Project) ListDependencies(filter FilterType) []*ProjectDependency
func (*Project) SimpleName ¶
type ProjectDependency ¶
type ProjectDependency struct {
Source *Project
Target *Project
ID UUID
Versions *set.Set[string]
Data map[string]string
}
func NewDependency ¶
func NewDependency(source *Project, target *Project) *ProjectDependency
func (*ProjectDependency) GetData ¶
func (d *ProjectDependency) GetData(name string) string
func (*ProjectDependency) SetData ¶
func (d *ProjectDependency) SetData(name string, value string) bool
func (*ProjectDependency) String ¶
func (d *ProjectDependency) String() string
type ProjectDirectory ¶
type ProjectDirectory struct {
RelativePath string
Type ProjectDirectoryType
ID UUID
Size *Size
Changes *Changes
Metrics *Metrics
Data map[string]string
FirstSeen time.Time
LastSeen time.Time
}
func NewProjectDirectory ¶
func NewProjectDirectory(relativePath string) *ProjectDirectory
func (*ProjectDirectory) SeenAt ¶
func (d *ProjectDirectory) SeenAt(ts ...time.Time)
type ProjectDirectoryType ¶
type ProjectDirectoryType int
const ( SourceDir ProjectDirectoryType = iota TestsDir ConfigDir )
func (ProjectDirectoryType) String ¶
func (t ProjectDirectoryType) String() string
type ProjectType ¶
type ProjectType int
const ( Library ProjectType = iota CodeType DatabaseType )
func (ProjectType) String ¶
func (t ProjectType) String() string
type Projects ¶
type Projects struct {
// contains filtered or unexported fields
}
func NewProjects ¶
func NewProjects() *Projects
func (*Projects) GetOrCreate ¶
func (*Projects) GetOrCreateEx ¶
func (*Projects) ListProjects ¶
func (ps *Projects) ListProjects(ft FilterType) []*Project
func (*Projects) ListProjectsByRoot ¶
func (ps *Projects) ListProjectsByRoot(root string, ft FilterType) []*Project
type Repositories ¶
type Repositories struct {
// contains filtered or unexported fields
}
func NewRepositories ¶
func NewRepositories() *Repositories
func (*Repositories) Get ¶
func (s *Repositories) Get(rootDir string) *Repository
func (*Repositories) GetByID ¶
func (s *Repositories) GetByID(id UUID) *Repository
func (*Repositories) GetOrCreate ¶
func (s *Repositories) GetOrCreate(rootDir string) *Repository
func (*Repositories) GetOrCreateEx ¶
func (s *Repositories) GetOrCreateEx(rootDir string, id *UUID) *Repository
func (*Repositories) List ¶
func (s *Repositories) List() []*Repository
type Repository ¶
type Repository struct {
Name string
RootDir string
VCS string
ID UUID
Data map[string]string
FirstSeen time.Time
LastSeen time.Time
FilesTotal int
FilesHead int
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(rootDir string, id *UUID) *Repository
func (*Repository) ContainsCommit ¶
func (r *Repository) ContainsCommit(hash string) bool
func (*Repository) CountCommits ¶
func (r *Repository) CountCommits() int
func (*Repository) GetCommit ¶
func (r *Repository) GetCommit(hash string) *RepositoryCommit
func (*Repository) GetCommitByID ¶
func (r *Repository) GetCommitByID(id UUID) *RepositoryCommit
func (*Repository) GetOrCreateCommit ¶
func (r *Repository) GetOrCreateCommit(hash string) *RepositoryCommit
func (*Repository) GetOrCreateCommitEx ¶
func (r *Repository) GetOrCreateCommitEx(hash string, id *UUID) *RepositoryCommit
func (*Repository) ListCommits ¶
func (r *Repository) ListCommits() []*RepositoryCommit
func (*Repository) SeenAt ¶
func (r *Repository) SeenAt(ts ...time.Time)
type RepositoryCommit ¶
type RepositoryCommit struct {
Hash string
Message string
Parents []UUID
Children []UUID
ID UUID
Date time.Time
CommitterID UUID
DateAuthored time.Time
AuthorID UUID
FilesModified int
FilesCreated int
FilesDeleted int
LinesModified int
LinesAdded int
LinesDeleted int
Blame *Blame
Ignore bool
}
func NewRepositoryCommit ¶
func NewRepositoryCommit(hash string, id *UUID) *RepositoryCommit
type RepositoryCommitFile ¶
type RepositoryCommitFile struct {
FileID UUID
Hash string
Change FileChangeType
OldFileIDs map[UUID]UUID
LinesModified int
LinesAdded int
LinesDeleted int
}
func NewRepositoryCommitFile ¶
func NewRepositoryCommitFile(fileID UUID) *RepositoryCommitFile
type RepositoryCommitFiles ¶
type RepositoryCommitFiles struct {
RepositoryID UUID
CommitID UUID
// contains filtered or unexported fields
}
func NewRepositoryCommitFiles ¶
func NewRepositoryCommitFiles(repositoryID UUID, commitID UUID) *RepositoryCommitFiles
func (*RepositoryCommitFiles) GetOrCreate ¶
func (l *RepositoryCommitFiles) GetOrCreate(fileID UUID) *RepositoryCommitFile
func (*RepositoryCommitFiles) List ¶
func (l *RepositoryCommitFiles) List() []*RepositoryCommitFile
Source Files
¶
- blame.go
- changes.go
- class.go
- file.go
- fileContents.go
- fileLine.go
- files.go
- filter_type.go
- metrics.go
- monthly_stats.go
- monthly_stats_line.go
- people.go
- people_relations.go
- person.go
- person_file.go
- person_repository.go
- product_area.go
- project.go
- project_dependency.go
- project_directory.go
- project_directory_type.go
- project_type.go
- projects.go
- repositories.go
- repository.go
- repository_commit.go
- repository_commit_file.go
- repository_commit_files.go
- size.go
- uuid.go
Click to show internal directories.
Click to hide internal directories.