jsonl

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Overview

Package jsonl implements an attestations collector that reads from files using the JSON Lines (jsonl) format.

Index

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

func WithPath

func WithPath(path string) optFn

Types

type Collector

type Collector struct {
	Options Options
}

func New

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

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 calls the attestation reader with a filter preconfigured with subject hashes.

type Options

type Options struct {
	MaxParallel int
	Paths       []string
}

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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