Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// DefaultClient is the default GitHub client.
DefaultClient = &defaultGitHub{
httpClient: defaultHTTPClient(),
urlParse: url.Parse,
}
)
Functions ¶
This section is empty.
Types ¶
type ContentSpec ¶ added in v0.12.0
type ContentSpec struct {
Repo
Path string // Path within repo to fetch
RefSpec string // A git refspec - branch, tag, or commit sha1.
}
ContentSpec represents coordinates for fetching contents from a GitHub repo
type GitHub ¶
type GitHub interface {
ValidateURL(u string) error
CommitSHA1(ctx context.Context, repo Repo, refSpec string) (string, error)
Contents(ctx context.Context, repo Repo, path, sha1 string) (*github.RepositoryContent, []*github.RepositoryContent, error)
}
GitHub is an interface for communicating with GitHub.
Click to show internal directories.
Click to hide internal directories.