reportsummary

package
v0.0.0-...-75135eb Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AnnotationsPrefixConfigName string = "annotations.prefix"
	DefaultAnnotationsPrefix    string = "charts.openshift.io"

	DigestsAnnotationName                string = "digest"
	LastCertifiedTimestampAnnotationName string = "lastCertifiedTimestamp"
	CertifiedOCPVersionsAnnotationName   string = "certifiedOpenShiftVersions"
	TestedOCPVersionAnnotationName       string = "testedOpenShiftVersion"
	SupportedOCPVersionsAnnotationName   string = "supportedOpenShiftVersions"

	MetadataSummary    SummaryType = "metadata"
	DigestsSummary     SummaryType = "digests"
	ResultsSummary     SummaryType = "results"
	AnnotationsSummary SummaryType = "annotations"
	AllSummary         SummaryType = "all"

	JSONReport SummaryFormat = "json"
	YAMLReport SummaryFormat = "yaml"

	// SkipDigestCheck: Use for testing purpose only
	SkipDigestCheck BooleanKey = "skipDigestCheck"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIReportSummary

type APIReportSummary interface {
	SetBoolean(key BooleanKey, value bool) APIReportSummary
	SetReport(report *report.Report) APIReportSummary
	GetContent(SummaryType, SummaryFormat) (string, error)
	SetValues(values map[string]interface{}) APIReportSummary
}

func NewReportSummary

func NewReportSummary() APIReportSummary

type Annotation

type Annotation struct {
	Name  string `json:"name" yaml:"name"`
	Value string `json:"value" yaml:"value"`
}

type BooleanKey

type BooleanKey string

type DigestReport

type DigestReport struct {
	ChartDigest     string `json:"chart" yaml:"chart"`
	PackageDigest   string `json:"package" yaml:"package"`
	PublicKeyDigest string `json:"publicKey,omitempty" yaml:"publicKey,omitempty"`
}

type MetadataReport

type MetadataReport struct {
	ProfileVendorType profiles.VendorType `json:"vendorType" yaml:"vendorType"`
	ProfileVersion    string              `json:"profileVersion" yaml:"profileVersion"`
	WebCatalogOnly    bool                `json:"webCatalogOnly" yaml:"webCatalogOnly,omitempty"`
	//nolint:stylecheck // complains Uri should be URI - leaving as is for now
	//because this produces an outputted file.
	ChartUri string              `json:"chart-uri" yaml:"chart-uri"`
	Chart    *helmchart.Metadata `json:"chart" yaml:"chart"`
}

type ReportSummary

type ReportSummary struct {
	AnnotationsReport []Annotation    `json:"annotations,omitempty" yaml:"annotations,omitempty"`
	DigestsReport     *DigestReport   `json:"digests,omitempty" yaml:"digests,omitempty"`
	MetadataReport    *MetadataReport `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	ResultsReport     *ResultsReport  `json:"results,omitempty" yaml:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*ReportSummary) GetContent

func (r *ReportSummary) GetContent(summary SummaryType, format SummaryFormat) (string, error)

func (*ReportSummary) SetBoolean

func (r *ReportSummary) SetBoolean(key BooleanKey, value bool) APIReportSummary

* Set a boolean flag. Overwrites any previous setting.

func (*ReportSummary) SetReport

func (r *ReportSummary) SetReport(report *report.Report) APIReportSummary

func (*ReportSummary) SetValues

func (r *ReportSummary) SetValues(values map[string]interface{}) APIReportSummary

type ResultsReport

type ResultsReport struct {
	Passed   string   `json:"passed" yaml:"passed"`
	Failed   string   `json:"failed" yaml:"failed"`
	Messages []string `json:"message" yaml:"message"`
}

type SummaryFormat

type SummaryFormat string

type SummaryType

type SummaryType string

Jump to

Keyboard shortcuts

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