verifier

package
v1.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

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

	// 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,
		executor executor.Executor) (VerifierResult, error)
}

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

type VerifierResult

type VerifierResult struct {
	Subject       string           `json:"subject,omitempty"`
	IsSuccess     bool             `json:"isSuccess"`
	Name          string           `json:"name,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