Versions in this module Expand all Collapse all v0 v0.4.0 Oct 4, 2026 Changes in this version + const DefaultMaxReadSize + var ErrNoFetcherConfigured = errors.New("no repository with fetch capabilities configured") + var ErrNoStorerConfigured = errors.New("no repository with store capabilities configured") + var ErrTypeAlreadyRegistered = errors.New("collector type already registered") + func LoadDefaultRepositoryTypes() error + func RegisterCollectorType(moniker string, factory RepositoryFactory) error + func RepositoryFromString(init string) (attestation.Repository, error) + func UnregisterCollectorType(moniker string) + type Agent struct + Cache Cache + Options Options + Repositories []attestation.Repository + func New(funcs ...InitFunction) (*Agent, error) + func NewWithOptions(opts *Options) *Agent + func (agent *Agent) AddKeys(keys ...key.PublicKeyProvider) + func (agent *Agent) AddRepository(repos ...attestation.Repository) error + func (agent *Agent) AddRepositoryFromString(init string) error + func (agent *Agent) Fetch(ctx context.Context, optFn ...FetchOptionsFunc) ([]attestation.Envelope, error) + func (agent *Agent) FetchAttestationsByPredicateType(ctx context.Context, pt []attestation.PredicateType, optFn ...FetchOptionsFunc) ([]attestation.Envelope, error) + func (agent *Agent) FetchAttestationsBySubject(ctx context.Context, subjects []attestation.Subject, optFn ...FetchOptionsFunc) ([]attestation.Envelope, error) + func (agent *Agent) Store(ctx context.Context, envelopes []attestation.Envelope, ...) error + func (agent *Agent) StoreFromFiles(ctx context.Context, paths []string, optFn ...StoreOptionsFunc) error + type Cache interface + GetAttestationsByPredicateType func(context.Context, []attestation.PredicateType) (*[]attestation.Envelope, error) + GetAttestationsBySubject func(context.Context, []attestation.Subject) (*[]attestation.Envelope, error) + StoreAttestationsByPredicateType func(context.Context, []attestation.PredicateType, *[]attestation.Envelope) error + StoreAttestationsBySubject func(context.Context, []attestation.Subject, *[]attestation.Envelope) error + type FetchOptionsFunc func(*attestation.FetchOptions) + func WithLimit(n int) FetchOptionsFunc + func WithQuery(q *attestation.Query) FetchOptionsFunc + type InitFunction func(*Agent) error + func WithKeyFiles(paths ...string) InitFunction + func WithKeys(keys ...key.PublicKeyProvider) InitFunction + func WithMaxReadSize(n int64) InitFunction + func WithParallelFetches(threads int) InitFunction + func WithParallelStores(threads int) InitFunction + func WithRepository(repo attestation.Repository) InitFunction + type MemoryCache struct + func NewMemoryCache() *MemoryCache + func (memcache *MemoryCache) GetAttestationsByPredicateType(ctx context.Context, pt []attestation.PredicateType) (*[]attestation.Envelope, error) + func (memcache *MemoryCache) GetAttestationsBySubject(ctx context.Context, subjects []attestation.Subject) (*[]attestation.Envelope, error) + func (memcache *MemoryCache) StoreAttestationsByPredicateType(ctx context.Context, pt []attestation.PredicateType, ...) error + func (memcache *MemoryCache) StoreAttestationsBySubject(ctx context.Context, subjects []attestation.Subject, ...) error + type Options struct + FailIfNoFetchers bool + Fetch attestation.FetchOptions + Keys []key.PublicKeyProvider + MaxReadSize int64 + ParallelFetches int + ParallelStores int + Store attestation.StoreOptions + UseCache bool + UserAgentString string + type RepositoryFactory func(string) (attestation.Repository, error) + type StoreOptionsFunc func(*attestation.StoreOptions)