output

package
v0.4.49 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Output

type Output struct {
	ImageAccessibleCheck      VerificationStatus          `json:"imageAccessibleCheck"`
	ImageSignatureCheck       VerificationStatus          `json:"imageSignatureCheck"`
	AttestationSignatureCheck VerificationStatus          `json:"attestationSignatureCheck"`
	AttestationSyntaxCheck    VerificationStatus          `json:"attestationSyntaxCheck"`
	PolicyCheck               []evaluator.Outcome         `json:"policyCheck"`
	ExitCode                  int                         `json:"-"`
	Signatures                []signature.EntitySignature `json:"signatures,omitempty"`
	Attestations              []attestation.Attestation   `json:"attestations,omitempty"`
	ImageURL                  string                      `json:"-"`
	Detailed                  bool                        `json:"-"`
	Data                      []evaluator.Data            `json:"-"`
	Policy                    policy.Policy               `json:"-"`
	PolicyInput               []byte                      `json:"-"`
}

Output is a struct representing checks and exit code.

func (*Output) Print

func (o *Output) Print(out io.Writer) error

Print prints an Output instance

func (*Output) SetAttestationSignatureCheckFromError

func (o *Output) SetAttestationSignatureCheckFromError(err error)

SetAttestationSignatureCheck sets the passed and result.message fields of the AttestationSignatureCheck to the given values.

func (*Output) SetAttestationSyntaxCheckFromError

func (o *Output) SetAttestationSyntaxCheckFromError(err error)

SetAttestationSyntaxCheck sets the passed and result.message fields of the AttestationSyntaxCheck to the given values.

func (*Output) SetImageAccessibleCheckFromError

func (o *Output) SetImageAccessibleCheckFromError(err error)

SetImageAccessibleCheck sets the passed and result.message fields of the ImageAccessibleCheck to the given values.

func (*Output) SetImageSignatureCheckFromError

func (o *Output) SetImageSignatureCheckFromError(err error)

SetImageSignatureCheck sets the passed and result.message fields of the ImageSignatureCheck to the given values.

func (*Output) SetPolicyCheck

func (o *Output) SetPolicyCheck(results []evaluator.Outcome)

SetPolicyCheck sets the PolicyCheck and ExitCode to the results and exit code of the Results

func (Output) Successes

func (o Output) Successes() []evaluator.Result

Successes aggregates and returns all successes.

func (Output) Violations

func (o Output) Violations() []evaluator.Result

Violations aggregates and returns all violations.

func (Output) Warnings

func (o Output) Warnings() []evaluator.Result

Warnings aggregates and returns all warnings.

type Outputs

type Outputs []*Output

Outputs is an array of Output

func (Outputs) Print

func (o Outputs) Print(out io.Writer) error

Print prints an Outputs instance

type VerificationStatus

type VerificationStatus struct {
	Passed bool              `json:"passed"`
	Result *evaluator.Result `json:"result,omitempty"`
}

VerificationStatus represents the status of a verification check.

Jump to

Keyboard shortcuts

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