Documentation
¶
Overview ¶
Package github implements a collector that reads from the GitHub attestations store.
Index ¶
- Constants
- 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) FetchBySubject(ctx context.Context, opts attestation.FetchOptions, subj []attestation.Subject) ([]attestation.Envelope, error)
- func (c *Collector) Store(ctx context.Context, _ attestation.StoreOptions, ...) error
- type Options
Constants ¶
View Source
const (
TypeMoniker = "github"
)
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), }
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) 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.
func (*Collector) Store ¶ added in v0.2.5
func (c *Collector) Store(ctx context.Context, _ attestation.StoreOptions, envelopes []attestation.Envelope) error
Store implements the attestations.Storer interface
Click to show internal directories.
Click to hide internal directories.