Documentation
¶
Index ¶
- func CheckRepo(ghClient *github.Client, repo string) (string, error)
- func GHGetAssetData(assets []*github.ReleaseAsset) map[string]string
- func GetAssetbyName(relFileName string, assets []*github.ReleaseAsset) (string, string)
- func GetGHCLient(baseUrl string, tokenvar string) *github.Client
- func GetRateLimit(ghClient *github.Client) (remaining int, limit int, err error)
- func IsRateLimited(err error) bool
- func ShowLimits(ghClient *github.Client) error
- type BadRepoFormat
- type InvalidGhResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GHGetAssetData ¶ added in v0.9.1
func GHGetAssetData(assets []*github.ReleaseAsset) map[string]string
GHGetAssetData will create a map of names + download urls
func GetAssetbyName ¶
func GetAssetbyName(relFileName string, assets []*github.ReleaseAsset) (string, string)
I should refactor this a bit to use a regex for Arch to interchange amd64 v x86_64 rel* vars should come in a interface
func GetGHCLient ¶
GetGHClient will get a go-github client with auth for api access
func GetRateLimit ¶ added in v0.13.0
GetRateLimit returns the remaining and total core API quota for the client's token. Hitting this endpoint does not count against the primary rate limit, so we use it for a cheap, non-fatal pre-flight check.
func IsRateLimited ¶ added in v0.13.0
IsRateLimited reports whether err is a GitHub primary or secondary rate limit error, so that callers can surface a clear message instead of a generic one.
func ShowLimits ¶ added in v0.5.3
ShowLimits will log the current limits values
Types ¶
type BadRepoFormat ¶ added in v0.5.4
type BadRepoFormat struct {
// contains filtered or unexported fields
}
func (*BadRepoFormat) Error ¶ added in v0.5.4
func (e *BadRepoFormat) Error() string
type InvalidGhResponse ¶ added in v0.5.4
type InvalidGhResponse struct {
// contains filtered or unexported fields
}
func (*InvalidGhResponse) Error ¶ added in v0.5.4
func (e *InvalidGhResponse) Error() string