Documentation
¶
Index ¶
- func GetGitHubHeaders(requestURL string) map[string]string
- func GetGitHubRelease(owner, repo, requestedVersion string) (tarballURL, downloadedRelease string, err error)
- func GetGitHubToken() (string, string)
- func HasGitHubToken() bool
- func HasInvalidGitHubToken(response interface{}) error
- type Client
- type ListOptions
- type Repository
- type SearchOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGitHubHeaders ¶ added in v1.24.8
GetGitHubHeaders returns headers to be used in GitHub REST API requests if the URL is for GitHub. See https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
func GetGitHubRelease ¶ added in v1.24.8
func GetGitHubRelease(owner, repo, requestedVersion string) (tarballURL, downloadedRelease string, err error)
GetGitHubRelease gets the tarball URL and version for a GitHub repository release
func GetGitHubToken ¶ added in v1.24.8
GetGitHubToken returns the GitHub token from the environment and the name of the variable it was found in.
func HasGitHubToken ¶ added in v1.24.9
func HasGitHubToken() bool
HasGitHubToken returns true if a GitHub token is set in the environment.
func HasInvalidGitHubToken ¶ added in v1.24.9
func HasInvalidGitHubToken(response interface{}) error
HasInvalidGitHubToken checks if the response indicates an invalid GitHub token. This is possible if we get 401 or 404 response.
Types ¶
type ListOptions ¶ added in v1.24.8
type ListOptions = github.ListOptions
type Repository ¶ added in v1.24.8
type Repository = github.Repository
type SearchOptions ¶ added in v1.24.8
type SearchOptions = github.SearchOptions
Click to show internal directories.
Click to hide internal directories.