note

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package note implements an attestation fetcher that can read from git commit notes.

Index

Constants

This section is empty.

Variables

View Source
var Build = func(istr string) (attestation.Repository, error) {
	return New(WithLocator(istr))
}

Implement the factory function

View Source
var TypeMoniker = "note"

Functions

func WithHttpAuth added in v0.2.7

func WithHttpAuth(username, password string) optFn

func WithInit added in v0.2.7

func WithInit(init string) optFn

func WithLocator

func WithLocator(locator string) optFn

func WithPush added in v0.2.7

func WithPush(push bool) 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.

func (*Collector) Store added in v0.2.7

func (c *Collector) Store(ctx context.Context, opts attestation.StoreOptions, envelopes []attestation.Envelope) error

Store implements the attestation.Storer interface

type Options

type Options struct {
	Locator string
	// Push determines whether to push notes to remote after storing.
	// If nil, defaults to true for remote repos, false for local file:// repos.
	Push *bool

	// Username and password to use when git connects via HTTP
	HttpUsername, HttpPassword 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