gh

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRepo added in v0.5.4

func CheckRepo(ghClient *github.Client, repo string) (string, error)

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

func GetGHCLient(baseUrl string, tokenvar string) *github.Client

GetGHClient will get a go-github client with auth for api access

func GetRateLimit added in v0.13.0

func GetRateLimit(ghClient *github.Client) (remaining int, limit int, err error)

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

func IsRateLimited(err error) bool

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

func ShowLimits(ghClient *github.Client) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL