githubfetch

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeFetcher

type CodeFetcher interface {
	GetCommitSHA(tracer.Span, string, string, string) (string, error)
	Get(tracer.Span, 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(parentSpan tracer.Span, 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(parentSpan tracer.Span, owner string, repo string, ref string) (csha string, err 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