Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeFetcher ¶
type FakeFetcher struct { FetchFunc func(ctx context.Context, repo string, ref string, destinationPath string) error GetCommitSHAFunc func(ctx context.Context, repo string, ref string) (string, error) }
func (*FakeFetcher) GetCommitSHA ¶
type GitHubFetcher ¶
type GitHubFetcher struct {
// contains filtered or unexported fields
}
GitHubFetcher represents a github data fetcher
func NewGitHubFetcher ¶
func NewGitHubFetcher(token string) *GitHubFetcher
NewGitHubFetcher returns a new github fetcher
func (*GitHubFetcher) Fetch ¶
func (gf *GitHubFetcher) Fetch(ctx context.Context, repo, ref, destinationPath string) error
Fetch fetches the content for repo at ref, writing the tree to destinationPath The destination will contain exactly one subdirectory with a pseudorandom name (generated by GitHub) based on the repo name. The contents of this subdirectory is the root of the repo and all content is underneath it. Example: [destinationPath]/foo-repo-name-12345/README.md (etc)
func (*GitHubFetcher) GetCommitSHA ¶
func (gf *GitHubFetcher) GetCommitSHA(ctx context.Context, repo string, ref string) (csha string, err error)
GetCommitSHA returns the commit SHA for a reference
Click to show internal directories.
Click to hide internal directories.