source

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchivistaSource

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

func NewArchvistSource

func NewArchvistSource(client *archivista.Client) *ArchivistaSource

func (*ArchivistaSource) Search

func (s *ArchivistaSource) Search(ctx context.Context, collectionName string, subjectDigests, attestations []string) ([]CollectionEnvelope, error)

type CollectionEnvelope

type CollectionEnvelope struct {
	Envelope   dsse.Envelope
	Statement  intoto.Statement
	Collection attestation.Collection
	Reference  string
}

type ErrDuplicateReference

type ErrDuplicateReference string

func (ErrDuplicateReference) Error

func (e ErrDuplicateReference) Error() string

type MemorySource

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

func NewMemorySource

func NewMemorySource() *MemorySource

func (*MemorySource) LoadBytes

func (s *MemorySource) LoadBytes(reference string, data []byte) error

func (*MemorySource) LoadEnvelope

func (s *MemorySource) LoadEnvelope(reference string, env dsse.Envelope) error

func (*MemorySource) LoadFile

func (s *MemorySource) LoadFile(path string) error

func (*MemorySource) LoadReader

func (s *MemorySource) LoadReader(reference string, r io.Reader) error

func (*MemorySource) Search

func (s *MemorySource) Search(ctx context.Context, collectionName string, subjectDigests, attestations []string) ([]CollectionEnvelope, error)

type MultiSource

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

func NewMultiSource

func NewMultiSource(sources ...Sourcer) *MultiSource

func (*MultiSource) Search

func (s *MultiSource) Search(ctx context.Context, collectionName string, subjectDigests, attestations []string) ([]CollectionEnvelope, error)

Search concurrently queries all sources and returns the combined results.

type Sourcer

type Sourcer interface {
	Search(ctx context.Context, collectionName string, subjectDigests, attestations []string) ([]CollectionEnvelope, error)
}

type VerifiedCollection

type VerifiedCollection struct {
	Verifiers []cryptoutil.Verifier
	CollectionEnvelope
}

type VerifiedSource

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

func NewVerifiedSource

func NewVerifiedSource(source Sourcer, verifyOpts ...dsse.VerificationOption) *VerifiedSource

func (*VerifiedSource) Search

func (s *VerifiedSource) Search(ctx context.Context, collectionName string, subjectDigests, attestations []string) ([]VerifiedCollection, error)

type VerifiedSourcer

type VerifiedSourcer interface {
	Search(ctx context.Context, collectionName string, subjectDigests, attestations []string) ([]VerifiedCollection, error)
}

Jump to

Keyboard shortcuts

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