v1.0.0 Latest Latest

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

Go to latest
Published: Jun 10, 2015 License: BSD-3-Clause Imports: 12 Imported by: 2



Package repo provides functions for accessing VCS information.



View Source
const (
	Git = "git"
	Hg  = "mercurial"
	SVN = "subversion"
	Bzr = "bazaar"
	CVS = "cvs"

Repository types.


This section is empty.


This section is empty.


type Repo

type Repo interface {
	// FetchCommits populates Commits attribute with all commits of a repository.
	FetchCommits() error

	// GetRepository returns a repository structure from a repo.
	GetRepository() *model.Repository

	// GetName returns the name of a repo.
	GetName() string

	// GetVCS returns the VCS typoe of a repo.
	GetVCS() string

	// GetCloneURL returns the clone URL of a repo.
	GetCloneURL() string

	// GetClonePath returns the clone path of a repo.
	GetClonePath() string

	// GetDefaultBranch returns the default branch of a repo.
	GetDefaultBranch() string

	// GetCommits returns the list of commits of a repo.
	GetCommits() []model.Commit

	// Cleanup needs to be called when done using the repository. It performs
	// some housekeeping if necessary.
	Cleanup() error

Repo interface defines what needs to be implemented to construct a Repo object.

func New

func New(cfg config.DataConfig, path string) (Repo, error)

New creates a new Repo object.

Jump to

Keyboard shortcuts

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