types

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpecVersion      string = "0.1.0"
	Version          string = "version"
	Name             string = "name"
	Type             string = "type"
	ArtifactTypes    string = "artifactTypes"
	NestedReferences string = "nestedReferences"
	Source           string = "source"
)
View Source
const (
	ErrUnknown                     uint = iota // 0
	ErrConfigParsingFailure                    // 1
	ErrInvalidVerifierConfig                   // 2
	ErrUnknownCommand                          // 3
	ErrMissingEnvironmentVariables             // 4
	ErrIOFailure                               // 5
	ErrVersionNotSupported                     // 6
	ErrArgsParsingFailure                      // 7
	ErrPluginCmdFailure                        // 8
	ErrInternalFailure             uint = 999
)

Variables

This section is empty.

Functions

func GetVerifierResult

func GetVerifierResult(result []byte) (*verifier.VerifierResult, error)

GetVerifierResult encodes the given JSON data into verify result object

func WriteVerifyResultResult

func WriteVerifyResultResult(result *verifier.VerifierResult, w io.Writer) error

WriteVerifyResultResult writes the given result as JSON data to the writer w

Types

type VerifierResult

type VerifierResult struct {
	IsSuccess   bool   `json:"isSuccess"`
	Message     string `json:"message"`
	ErrorReason string `json:"errorReason,omitempty"`
	Remediation string `json:"remediation,omitempty"`
	// Name will be deprecated in v2, tracking issue: https://github.com/ratify-project/ratify/issues/1707
	Name         string `json:"name"`
	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"`
	Extensions   interface{} `json:"extensions"`
}

VerifierResult describes the verification result returned from the verifier plugin

func CreateVerifierResult

func CreateVerifierResult(verifierName, verifierType, message string, isSuccess bool, err *errors.Error) VerifierResult

CreateVerifierResult creates a new verifier result object from given input.

func NewVerifierResult

func NewVerifierResult(result verifier.VerifierResult) VerifierResult

NewVerifierResult creates a new verifier result object from the given verifier.VerifierResult.

Jump to

Keyboard shortcuts

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