github

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

func New

func New(repo, token string) (*Source, error)

New validates repo and returns a Source.

func (*Source) Name

func (s *Source) Name() string

Name implements server.Source.

func (*Source) Releases

func (s *Source) Releases(ctx context.Context) ([]server.SourceRelease, error)

Releases implements server.Source.

Jump to

Keyboard shortcuts

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