parser

package
v0.0.0-...-7d3b672 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BRANCH = "BRANCH"
	TAG    = "TAG"
)
View Source
const DefaultUser = "git"

Variables

View Source
var TypeNotMatchError = "the requested type does not match the type in the ODB"

Functions

This section is empty.

Types

type GitRepo

type GitRepo struct {
	// contains filtered or unexported fields
}

func (*GitRepo) Close

func (r *GitRepo) Close() errors.Error

Close resources

func (*GitRepo) CollectAll

func (r *GitRepo) CollectAll(subtaskCtx plugin.SubTaskContext) errors.Error

CollectAll The main parser subtask

func (*GitRepo) CollectBranches

func (r *GitRepo) CollectBranches(subtaskCtx plugin.SubTaskContext) errors.Error

CollectBranches Collect branch data

func (*GitRepo) CollectCommits

func (r *GitRepo) CollectCommits(subtaskCtx plugin.SubTaskContext) errors.Error

CollectCommits Collect data from each commit, we can also get the diff line

func (*GitRepo) CollectDiffLine

func (r *GitRepo) CollectDiffLine(subtaskCtx plugin.SubTaskContext) errors.Error

CollectDiffLine get line diff data from a specific branch

func (*GitRepo) CollectTags

func (r *GitRepo) CollectTags(subtaskCtx plugin.SubTaskContext) errors.Error

CollectTags Collect Tags data

func (*GitRepo) CountBranches

func (r *GitRepo) CountBranches(ctx context.Context) (int, errors.Error)

CountBranches count the number of branches in a git repo

func (*GitRepo) CountCommits

func (r *GitRepo) CountCommits(ctx context.Context) (int, errors.Error)

CountCommits count the number of commits in a git repo

func (*GitRepo) CountTags

func (r *GitRepo) CountTags() (int, errors.Error)

CountTags Count git tags subtask

type GitRepoCreator

type GitRepoCreator struct {
	// contains filtered or unexported fields
}

func NewGitRepoCreator

func NewGitRepoCreator(store models.Store, logger log.Logger) *GitRepoCreator

func (*GitRepoCreator) CloneOverHTTP

func (l *GitRepoCreator) CloneOverHTTP(repoId, url, user, password, proxy string) (*GitRepo, errors.Error)

func (*GitRepoCreator) CloneOverSSH

func (l *GitRepoCreator) CloneOverSSH(repoId, url, privateKey, passphrase string) (*GitRepo, errors.Error)

func (*GitRepoCreator) LocalRepo

func (l *GitRepoCreator) LocalRepo(repoPath, repoId string) (*GitRepo, errors.Error)

LocalRepo open a local repository

Jump to

Keyboard shortcuts

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