Documentation
¶
Overview ¶
Package jsonl implements an attestations collector that reads from files using the JSON Lines (jsonl) format.
Index ¶
- Variables
- func WithMaxParallel(w int) 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 = "jsonl"
Functions ¶
func WithMaxParallel ¶
func WithMaxParallel(w int) optFn
Types ¶
type Collector ¶
type Collector struct {
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.