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 will be deprecated in v2, tracking issue: https://github.com/ratify-project/ratify/issues/1707 Name string `json:"name,omitempty"` VerifierName string `json:"verifierName,omitempty"` // Type will be deprecated in v2, tracking issue: https://github.com/ratify-project/ratify/issues/1707 Type string `json:"type,omitempty"` VerifierType string `json:"verifierType,omitempty"` ReferenceDigest string `json:"referenceDigest,omitempty"` ArtifactType string `json:"artifactType,omitempty"` Message string `json:"message,omitempty"` ErrorReason string `json:"errorReason,omitempty"` Remediation string `json:"remediation,omitempty"` Extensions interface{} `json:"extensions,omitempty"` NestedResults []VerifierResult `json:"nestedResults,omitempty"` }
VerifierResult describes the result of verifying a reference manifest for a subject. Note: This struct is used to represent the result of verification in v0.
func NewVerifierResult ¶
func NewVerifierResult(subject, verifierName, verifierType, message string, isSuccess bool, err *errors.Error, extensions interface{}) VerifierResult
NewVerifierResult creates a new VerifierResult object with the given parameters.
Click to show internal directories.
Click to hide internal directories.