Documentation
¶
Overview ¶
Package github implements a collector that reads from the GitHub attestations store.
Index ¶
- Variables
- func WithOwner(owner string) optFn
- func WithRepo(repo string) optFn
- type Collector
- func (c *Collector) Fetch(ctx context.Context, opts attestation.FetchOptions) ([]attestation.Envelope, error)
- func (c *Collector) FetchByPredicateType(ctx context.Context, opts attestation.FetchOptions, ...) ([]attestation.Envelope, error)
- func (c *Collector) FetchBySubject(ctx context.Context, opts attestation.FetchOptions, subj []attestation.Subject) ([]attestation.Envelope, error)
- type Options
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 ¶
Types ¶
type Collector ¶
type Collector struct {
Options Options
// contains filtered or unexported fields
}
func (*Collector) Fetch ¶
func (c *Collector) Fetch(ctx context.Context, opts attestation.FetchOptions) ([]attestation.Envelope, error)
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.
Click to show internal directories.
Click to hide internal directories.