githubfetch

package
v0.0.0-...-e6eacfd Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeFetcher

type CodeFetcher interface {
	GetCommitSHA(string, string, string) (string, error)
	Get(string, string, string) (io.Reader, error)
}

CodeFetcher represents an object capable of fetching code and returning a gzip-compressed tarball io.Reader

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) Get

func (gf *GitHubFetcher) Get(owner string, repo string, ref string) (tarball io.Reader, err error)

Get fetches contents of GitHub repo and returns the processed contents as an in-memory io.Reader.

func (*GitHubFetcher) GetCommitSHA

func (gf *GitHubFetcher) GetCommitSHA(owner string, repo string, ref string) (string, error)

GetCommitSHA returns the commit SHA for a reference

Jump to

Keyboard shortcuts

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