Documentation ¶
Index ¶
- Variables
- type Repo
- func (r *Repo) GetCommits(ref *plumbing.Reference) (gitypes.Commits, error)
- func (r *Repo) GetHEAD() *plumbing.Reference
- func (r *Repo) GetReadme() string
- func (r *Repo) GetReferences() []*plumbing.Reference
- func (r *Repo) LatestFile(path string) (string, error)
- func (r *Repo) Name() string
- func (r *Repo) Repository() *git.Repository
- func (r *Repo) SetHEAD(ref *plumbing.Reference) error
- func (r *Repo) Tree(ref *plumbing.Reference, path string) (*object.Tree, error)
- type RepoSource
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingRepo = errors.New("missing repo")
ErrMissingRepo indicates that the requested repository could not be found.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct { Readme string // contains filtered or unexported fields }
Repo represents a Git repository.
func (*Repo) GetCommits ¶ added in v0.2.0
GetCommits returns the commits for a repository.
func (*Repo) GetReferences ¶ added in v0.2.2
GetReferences returns the references for a repository.
func (*Repo) LatestFile ¶
LatestFile returns the latest file at the specified path in the repository.
func (*Repo) Repository ¶
func (r *Repo) Repository() *git.Repository
GetRepository returns the underlying go-git repository object.
type RepoSource ¶
type RepoSource struct { Path string // contains filtered or unexported fields }
RepoSource is a reference to an on-disk repositories.
func NewRepoSource ¶
func NewRepoSource(repoPath string) *RepoSource
NewRepoSource creates a new RepoSource.
func (*RepoSource) AllRepos ¶
func (rs *RepoSource) AllRepos() []*Repo
AllRepos returns all repositories for the given RepoSource.
func (*RepoSource) GetRepo ¶
func (rs *RepoSource) GetRepo(name string) (*Repo, error)
GetRepo returns a repository by name.
func (*RepoSource) InitRepo ¶
func (rs *RepoSource) InitRepo(name string, bare bool) (*Repo, error)
InitRepo initializes a new Git repository.
func (*RepoSource) LoadRepos ¶
func (rs *RepoSource) LoadRepos() error
LoadRepos opens Git repositories.
Click to show internal directories.
Click to hide internal directories.