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: 5

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