Documentation
¶
Overview ¶
Package github reads releases from GitHub Releases (or GitHub Enterprise) over the REST API. It is its own module so the ota core stays free of third-party dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// Repo is "owner/name".
Repo string
// Token is optional for public repositories and required for private ones.
Token string
// TokenFunc, when set, supplies a token per request instead of Token, for
// credentials that expire (e.g. GitHub App installation tokens).
TokenFunc func(context.Context) (string, error)
// APIURL defaults to https://api.github.com; set it for GitHub Enterprise.
APIURL string
// IncludePrereleases also ingests releases marked pre-release.
IncludePrereleases bool
// PerPage is how many recent releases are read. Default 30.
PerPage int
Client *http.Client
}
Source lists a repository's published (non-draft) releases.