Help us shape the future of Go! Take the 2026 Go Developer Survey

github

package
v1.233.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package github implements the "github-tags" and "github-releases" datasource resolvers backed by the shared pkg/github client (token chain and rate-limit handling included).

Index

Constants

View Source
const (
	DatasourceTags     = "github-tags"
	DatasourceReleases = "github-releases"
)

Datasource names served by this resolver.

Variables

View Source
var ErrInvalidPackage = errors.New("github package must be in owner/repo form")

ErrInvalidPackage is returned when a package is not in owner/repo form.

Functions

This section is empty.

Types

type Resolver

type Resolver struct{}

Resolver resolves GitHub tag and release versions.

func (Resolver) Names

func (Resolver) Names() []string

Names returns the datasource names this resolver serves.

func (Resolver) Pin

func (Resolver) Pin(ctx context.Context, req *resolver.Request, version string) (string, error)

Pin resolves a tag or release version to its commit SHA.

func (Resolver) Versions

func (Resolver) Versions(ctx context.Context, req *resolver.Request) ([]resolver.Candidate, error)

Versions lists candidate versions from GitHub tags or releases. Releases carry publish timestamps (used for update cooldowns) and prerelease flags; tags carry the commit SHA as the candidate digest.

Jump to

Keyboard shortcuts

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