store

package
v0.0.0-...-6018a90 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package store defines generic interfaces for signature stores.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("no more signatures to check")

ErrNotFound is a base error for Callback, to be used when the store decides one signature-retrieval avenue is exhausted.

Functions

This section is empty.

Types

type Callback

type Callback func(ctx context.Context, signature []byte, errIn error) (done bool, err error)

Callback returns true if an acceptable signature has been found, or an error if the loop should be aborted. If there was a problem retrieving the signature, the incoming error will describe the problem and the function can decide how to handle that error.

type Store

type Store interface {

	// Signatures fetches signatures for the provided digest, feeding
	// them into the provided callback until an acceptable signature is
	// found or an error occurs.
	//
	// Not finding additional signatures should result in a callback
	// call with an error wrapping ErrNotFound, to allow the caller to
	// figure out when and why the store was unable to find a signature.
	// When a store has several lookup mechanisms, this may result in
	// several callback calls with different ErrNotFound.  Signatures
	// itself should return nil in this case, because eventually running
	// out of signatures is an expected part of any invocation where the
	// callback calls never return done=true.
	Signatures(ctx context.Context, name string, digest string, fn Callback) error

	// String returns a description of where this store finds
	// signatures.  The string is a short clause intended for display in
	// a description of the verifier.
	String() string
}

Store provides access to signatures by digest.

Directories

Path Synopsis
Package memory implements an in-memory signature store.
Package memory implements an in-memory signature store.
Package parallel combines several signature stores in a single store.
Package parallel combines several signature stores in a single store.
Package serial combines several signature stores in a single store.
Package serial combines several signature stores in a single store.
Package sigstore retrieves signatures using the sig-store protocol described in [1].
Package sigstore retrieves signatures using the sig-store protocol described in [1].

Jump to

Keyboard shortcuts

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