report

package
v0.0.0-...-29c0a4e Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FailOutcomeType    OutcomeType = "FAIL"
	PassOutcomeType    OutcomeType = "PASS"
	SkippedOutcomeType OutcomeType = "SKIPPED"
	UnknownOutcomeType OutcomeType = "UNKNOWN"

	JSONReport ReportFormat = "json"
	YamlReport ReportFormat = "yaml"

	ReportShaVersion string = "v1.9.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIReport

type APIReport interface {
	GetContent(ReportFormat) (string, error)
	SetContent(string) APIReport
	SetURL(url *url.URL) APIReport
	Load() (*Report, error)
	GetReportDigest() (string, error)
}

func NewReport

func NewReport() APIReport

type CheckReport

type CheckReport struct {
	Check   apichecks.CheckName `json:"check" yaml:"check"`
	Type    apichecks.CheckType `json:"type" yaml:"type"`
	Outcome OutcomeType         `json:"outcome" yaml:"outcome"`
	Reason  string              `json:"reason" yaml:"reason"`
}

type Digests

type Digests struct {
	Chart     string `json:"chart" yaml:"chart"`
	Package   string `json:"package,omitempty" yaml:"package,omitempty"`
	PublicKey string `hash:"ignore" json:"publicKey,omitempty" yaml:"publicKey,omitempty"`
}

type OutcomeType

type OutcomeType string

type Profile

type Profile struct {
	VendorType string `json:"vendorType" yaml:"VendorType"`
	Version    string `json:"version" yaml:"version"`
}

type Report

type Report struct {
	Apiversion string         `json:"apiversion" yaml:"apiversion"`
	Kind       string         `json:"kind" yaml:"kind"`
	Metadata   ReportMetadata `json:"metadata" yaml:"metadata"`
	Results    []*CheckReport `json:"results" yaml:"results"`
	// contains filtered or unexported fields
}

func (*Report) GetContent

func (r *Report) GetContent(format ReportFormat) (string, error)

func (*Report) GetReportDigest

func (r *Report) GetReportDigest() (string, error)

func (*Report) Init

func (r *Report) Init() APIReport

func (*Report) Load

func (r *Report) Load() (*Report, error)

func (*Report) SetContent

func (r *Report) SetContent(report string) APIReport

func (*Report) SetURL

func (r *Report) SetURL(url *url.URL) APIReport

type ReportFormat

type ReportFormat string

type ReportMetadata

type ReportMetadata struct {
	ToolMetadata ToolMetadata        `json:"tool" yaml:"tool"`
	ChartData    *helmchart.Metadata `json:"chart" yaml:"chart"`
	Overrides    string              `json:"chart-overrides" yaml:"chart-overrides"`
}

type ShaValue

type ShaValue struct{}

type ToolMetadata

type ToolMetadata struct {
	Version      string  `json:"verifier-version" yaml:"verifier-version"`
	Profile      Profile `json:"profile" yaml:"profile"`
	ReportDigest string  `json:"reportDigest" yaml:"reportDigest"`
	//nolint:stylecheck // complaining Uri should be URI
	ChartUri                   string  `json:"chart-uri" yaml:"chart-uri"`
	Digests                    Digests `json:"digests" yaml:"digests"`
	LastCertifiedTimestamp     string  `json:"lastCertifiedTimestamp,omitempty" yaml:"lastCertifiedTimestamp,omitempty"`
	CertifiedOpenShiftVersions string  `json:"certifiedOpenShiftVersions,omitempty" yaml:"certifiedOpenShiftVersions,omitempty"`
	TestedOpenShiftVersion     string  `json:"testedOpenShiftVersion,omitempty" yaml:"testedOpenShiftVersion,omitempty"`
	SupportedOpenShiftVersions string  `json:"supportedOpenShiftVersions,omitempty" yaml:"supportedOpenShiftVersions,omitempty"`
	ProviderDelivery           bool    `json:"providerControlledDelivery,omitempty" yaml:"providerControlledDelivery,omitempty"`
	WebCatalogOnly             bool    `json:"webCatalogOnly" yaml:"webCatalogOnly" hash:"ignore"`
}

Jump to

Keyboard shortcuts

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