verifier

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReferenceVerifier

type ReferenceVerifier interface {
	// Name returns the name of the verifier
	Name() string

	// Type returns the type name of the verifier
	Type() string

	// CanVerify returns if the verifier can verify the given reference
	CanVerify(ctx context.Context, referenceDescriptor ocispecs.ReferenceDescriptor) bool

	// Verify verifies the given reference of a subject and returns the result of verification
	Verify(ctx context.Context,
		subjectReference common.Reference,
		referenceDescriptor ocispecs.ReferenceDescriptor,
		referrerStore referrerstore.ReferrerStore) (VerifierResult, error)

	GetNestedReferences() []string
}

ReferenceVerifier is an interface that defines methods to verify a reference for a subject by a verifier.

type VerifierResult

type VerifierResult struct {
	Subject       string           `json:"subject,omitempty"`
	IsSuccess     bool             `json:"isSuccess"`
	Name          string           `json:"name,omitempty"`
	Type          string           `json:"type,omitempty"`
	Message       string           `json:"message,omitempty"`
	Extensions    interface{}      `json:"extensions,omitempty"`
	NestedResults []VerifierResult `json:"nestedResults,omitempty"`
	ArtifactType  string           `json:"artifactType,omitempty"`
}

VerifierResult describes the result of verifying a reference manifest for a subject

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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