githubfetch

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: MIT Imports: 15 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(newrelic.Transaction, string, string, string) (string, error)
	Get(newrelic.Transaction, 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(txn newrelic.Transaction, 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(txn newrelic.Transaction, 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