sigstore

package
v0.0.0-...-0e3ae96 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package sigstore retrieves signatures using the sig-store protocol described in 1.

A URL (scheme http:// or https://) location that contains signatures. These signatures are in the atomic container signature format. The URL will have the digest of the image appended to it as "<STORE>/<ALGO>=<DIGEST>/signature-<NUMBER>" as described in the container image signing format. Signatures are searched starting at NUMBER 1 and incrementing if the signature exists but is not valid.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClient

func DefaultClient() (*http.Client, error)

DefaultClient creates an http.Client with no configuration.

Types

type CachedHTTPClientConstructor

type CachedHTTPClientConstructor struct {
	// contains filtered or unexported fields
}

CachedHTTPClientConstructor wraps an HTTPClient implementation so that it is not called more frequently than the configured limiter.

func NewCachedHTTPClientConstructor

func NewCachedHTTPClientConstructor(wrapped HTTPClient, limiter *rate.Limiter) *CachedHTTPClientConstructor

NewCachedHTTPClientConstructor creates a new cached constructor. If limiter is not specified it defaults to one call every 30 seconds.

func (*CachedHTTPClientConstructor) HTTPClient

func (c *CachedHTTPClientConstructor) HTTPClient() (*http.Client, error)

type HTTPClient

type HTTPClient func() (*http.Client, error)

HTTPClient returns a client suitable for retrieving signatures. It is not required to be unique per call, but may be called concurrently.

type Store

type Store struct {
	// URI is the base from which signature URIs are constructed.
	URI *url.URL

	// HTTPClient is called once for each Signatures call to ensure
	// requests are made with the currently-recommended parameters.
	HTTPClient HTTPClient
}

Store provides access to signatures stored in memory.

func (*Store) Signatures

func (s *Store) Signatures(ctx context.Context, name string, digest string, fn store.Callback) error

Signatures fetches signatures for the provided digest.

func (*Store) String

func (s *Store) String() string

String returns a description of where this store finds signatures.

Jump to

Keyboard shortcuts

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