Documentation
¶
Overview ¶
Package repo provides access to git repository metadata.
Index ¶
- Constants
- type CommitIterator
- type Git
- type Repository
- func Go(c *http.Client) Repository
- func NewCompositeRepository(rs ...Repository) Repository
- func NewGithub(c *github.Client, owner, repo string) Repository
- func NewGithubGo(c *http.Client) Repository
- func NewGitiles(c *gitiles.Client, repo string) Repository
- func NewGitilesGo(c *http.Client) Repository
- type Revisions
Constants ¶
const GoURL = "https://go.googlesource.com/go"
GoURL is the URL for the canonical Go git repository.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitIterator ¶
type CommitIterator interface { // Next returns the next commit, or io.EOF when done. Next() (*entity.Commit, error) Close() }
CommitIterator provides iterative access to a sequence of commits.
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git is a cloned local git repository.
type Repository ¶
type Repository interface { Revisions Log(ctx context.Context, ref string) ([]*entity.Commit, error) }
Repository provides access to git repository properties.
func Go ¶
func Go(c *http.Client) Repository
Go builds a Repository implementation for the go git repository. API calls are made with the provided HTTP client.
func NewCompositeRepository ¶
func NewCompositeRepository(rs ...Repository) Repository
NewCompositeRepository builds a Repository backed by one or more Repository implementations. Each method is implemented by calling each sub-Repository in turn and returning the first successful result. Panics if no Repositories are provided.
func NewGithubGo ¶
func NewGithubGo(c *http.Client) Repository
NewGithubGo builds a Repository implementation for the github mirror of the Go git repository at https://github.com/golang/go.
func NewGitiles ¶
func NewGitiles(c *gitiles.Client, repo string) Repository
func NewGitilesGo ¶
func NewGitilesGo(c *http.Client) Repository
NewGitilesGo builds a Repository implementation for the canonical Go git repository at https://go.googlesource.com/go/.
type Revisions ¶
Revisions provides query access to repository revisions.
func NewRevisionsCache ¶
NewRevisionsCache provides an in-memory cache in front of another Revisions fetcher.
func NewRevisionsFromDatabase ¶
NewRevisionsFromDatabase looks up revision information from a database. Only supports full SHA git refs.