Documentation
¶
Overview ¶
Package git implements an attestations collector that works on a git repository. This package implements the logic to interact with the git repo and relies on the filesystem collector to fetch and classify attestations.
Index ¶
- Variables
- func WithLocator(init string) optFn
- func WithPath(path 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(WithPath(istr)) }
Implement the factory function
View Source
var TypeMoniker = "git"
Functions ¶
func WithLocator ¶
func WithLocator(init string) optFn
Types ¶
type Collector ¶
type Collector struct {
Repo *git.Repository
FSCollector *filesystem.Collector
Options Options
}
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 calls the attestation reader with a filter preconfigured with subject hashes.
Click to show internal directories.
Click to hide internal directories.