github

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package github implements a collector that reads from the GitHub attestations store.

Index

Constants

This section is empty.

Variables

View Source
var Build = func(istr string) (attestation.Repository, error) {
	return New(WithRepo(istr))
}

Implement the factory function

View Source
var SupportedAlgorithms = []string{
	string(ita.AlgorithmSHA256), string(ita.AlgorithmSHA512),
}
View Source
var TypeMoniker = "github"

Functions

func WithOwner

func WithOwner(owner string) optFn

func WithRepo

func WithRepo(repo string) optFn

Types

type Collector

type Collector struct {
	Options Options
	// contains filtered or unexported fields
}

func New

func New(funcs ...optFn) (*Collector, error)

New returns a new collector

func (*Collector) Fetch

Fetch queries the repository and retrieves any attestations matching the query

func (*Collector) FetchByPredicateType

func (c *Collector) FetchByPredicateType(ctx context.Context, opts attestation.FetchOptions, pts []attestation.PredicateType) ([]attestation.Envelope, error)

func (*Collector) FetchBySubject

func (c *Collector) FetchBySubject(ctx context.Context, opts attestation.FetchOptions, subj []attestation.Subject) ([]attestation.Envelope, error)

FetchBySubject is the only method supported as the GitHub api can only list attestations by subject.

type Options

type Options struct {
	Owner string
	Repo  string
}

Jump to

Keyboard shortcuts

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