custom

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const BLACK = "black"
View Source
const DEPRECATED_API_COMPLY = "COMPLY"

nolint:golint

View Source
const DEPRECATED_API_NOT_COMPLY = "NOT COMPLY"

nolint:golint

View Source
const ERRORS = "ONLY ERRORS"

nolint:golint

View Source
const ERRORS_WARNINGS = "FIX ERRORS AND WARNINGS"

nolint:golint

View Source
const FOUND = "FOUND"

nolint:golint

View Source
const GREEN = "green"
View Source
const NOT_USED = "NOT USED"

nolint:golint

View Source
const OCPLabel = "com.redhat.openshift.versions"
View Source
const ORANGE = "orange"
View Source
const PASS = "PASSED IN ALL CHECKS"

nolint:golint

View Source
const RED = "red"
View Source
const USED = "USED"

nolint:golint

View Source
const WARNINGS = "CHECK THE WARNINGS"

nolint:golint

View Source
const YELLOW = "#ec8f1c"

Variables

View Source
var Flags = BindFlags{}

Functions

func BuildMapBundlesPerChannels

func BuildMapBundlesPerChannels(bundlesPerPkg []BundleDeprecate) map[string][]BundleDeprecate

BuildMapBundlesPerChannels returns a map of bundles per packages

func GetMaxOCPValue

func GetMaxOCPValue(b bundles.Column) string

GetMaxOCPValue returns the Max OCP annotation find on the bundle or an string not set to define that it was not set

func GetReportValues added in v0.1.0

func GetReportValues(bundles []BundleDeprecate, k8sVersion string) ([]string, []string, []string, []string)

func GetTheLatestBundleVersion

func GetTheLatestBundleVersion(bundlesFromChannel []BundleDeprecate) string

GetTheLatestBundleVersion returns the latest/upper semversion

func MapBundlesPerPackage

func MapBundlesPerPackage(bundlesReport []BundleDeprecate) map[string][]BundleDeprecate

MapBundlesPerPackage returns map with all bundles found per pkg name

func MapPkgsComplyingWithDeprecateAPI added in v0.1.0

func MapPkgsComplyingWithDeprecateAPI(
	mapPackagesWithBundles map[string][]BundleDeprecate, k8sVersion string) map[string][]BundleDeprecate

(Green) Complying If is not using deprecated API(s) at all in the head channels If has at least one channel head which is compatible with 4.9 (migrated) and the other head channels are with max ocp version

func ParseBundlesJSONReport

func ParseBundlesJSONReport() (bundles.Report, error)

ParseBundlesJSONReport parse the JSON result from the audit-tool index bundle report and return its structure

func ParseMultiBundlesJSONReport added in v0.1.0

func ParseMultiBundlesJSONReport() ([]bundles.Report, error)

ParseBundlesJSONReport parse the JSON result from the audit-tool index bundle report and return its structure

Types

type APIDashReport

type APIDashReport struct {
	ImageName         string
	ImageID           string
	ImageHash         string
	ImageBuild        string
	OCPVersion        string
	K8SVersion        string
	Migrated          []Migrated
	NotMigrated       []NotMigrated
	PotentialImpacted []PotentialImpacted
	GeneratedAt       string
}

func NewAPIDashReport

func NewAPIDashReport(bundlesReport bundles.Report, optionalValues map[string]string, filterPkg string) *APIDashReport

NewAPIDashReport returns the structure to render the Deprecate API custom dashboard nolint:dupl

type BindFlags

type BindFlags struct {
	Files           string            `json:"files,omitempty"`
	File            string            `json:"file,omitempty"`
	OutputPath      string            `json:"outputPath,omitempty"`
	Filter          string            `json:"filter,omitempty"`
	ContainerEngine string            `json:"containerEngine,omitempty"`
	OptionalValues  map[string]string `json:"optionalValues,omitempty"`
}

BindFlags define the Flags used to generate the bundleCSV report

type BundleDeprecate added in v0.1.0

type BundleDeprecate struct {
	BundleData        bundles.Column
	DeprecateAPIsMsgs []string
	ApisRemoved1_22   []string
	ApisRemoved1_25   []string
	ApisRemoved1_26   []string
	Permissions1_25   []string
	Permissions1_26   []string
}

func GetHeadOfChannels

func GetHeadOfChannels(bundlesOfPackage []BundleDeprecate) []BundleDeprecate

func GetLatestBundlesVersions

func GetLatestBundlesVersions(bundlesPerChannels map[string][]BundleDeprecate) []BundleDeprecate

GetQtLatestVersionChannelsState returns the qtd. of channels which are OK and configured with max ocp version

func (*BundleDeprecate) AddDeprecateDataFromValidators added in v0.1.0

func (bd *BundleDeprecate) AddDeprecateDataFromValidators()

func (*BundleDeprecate) AddPotentialWarning added in v0.1.0

func (bd *BundleDeprecate) AddPotentialWarning()

type Migrated

type Migrated struct {
	Name            string
	Kinds           []string
	Bundles         []string
	Channels        []string
	BundlesMigrated []string
	AllBundles      []BundleDeprecate
}

type MultipleArchitecturesBundleReport added in v0.2.0

type MultipleArchitecturesBundleReport struct {
	BundleData          bundles.Column
	InfraLabelsUsed     []string
	AllArchFound        map[string]string
	AllOsFound          map[string]string
	Errors              []string
	Warnings            []string
	MangerImage         []string
	Images              []string
	HasMultiArchSupport bool
	ForHideButton       string
}

type MultipleArchitecturesPackageReport added in v0.2.0

type MultipleArchitecturesPackageReport struct {
	Name    string
	Bundles []MultipleArchitecturesBundleReport
}

type MultipleArchitecturesReport added in v0.1.0

type MultipleArchitecturesReport struct {
	ImageName             string
	ImageID               string
	ImageHash             string
	ImageBuild            string
	GeneratedAt           string
	Unsupported           []MultipleArchitecturesPackageReport
	Supported             []MultipleArchitecturesPackageReport
	SupportedWithErrors   []MultipleArchitecturesPackageReport
	SupportedWithWarnings []MultipleArchitecturesPackageReport
}

func NewMultipleArchitecturesReport added in v0.1.0

func NewMultipleArchitecturesReport(bundlesReport bundles.Report, filter,
	containerTool string) *MultipleArchitecturesReport

nolint:dupl

type NotMigrated

type NotMigrated struct {
	Name            string
	Kinds           []string
	Channels        []string
	Bundles         []string
	BundlesMigrated []string
	AllBundles      []BundleDeprecate
}

type PackageQA added in v0.1.0

type PackageQA struct {
	PackageName                 string
	DeprecateAPI                []string
	DeprecateAPIColor           string
	CapabilityColor             string
	DisconnectedAnnotation      string
	DisconnectedAnnotationColor string
	ChannelNaming               string
	ChannelNamingColor          string
	SDKUsage                    string
	SDKUsageColor               string
	ScorecardDefaultImages      string
	ScorecardDefaultImagesColor string
	ScorecardCustomImages       string
	ScorecardCustomImagesColor  string
	Validators                  string
	ValidatorsColor             string
	ChannelNamesNotComply       []string
	ChannelNamesComply          []string
	BundlesWithoutDisconnect    []string
	HeadOfChannels              []BundleDeprecate
	Capabilities                []string
	Subscriptions               []string
}

func NewPkg added in v0.1.0

func NewPkg(pkgName string, bundlesOfPkg []BundleDeprecate, isRedHatIndex bool) PackageQA

type PotentialImpacted added in v0.1.0

type PotentialImpacted struct {
	Name    string
	Founds  []string
	Bundles []string
}

type QAReport added in v0.1.0

type QAReport struct {
	ImageName    string
	ImageID      string
	ImageHash    string
	ImageBuild   string
	GeneratedAt  string
	PackageGrade []PackageQA
}

func NewQAReport added in v0.1.0

func NewQAReport(bundlesReport bundles.Report, filter string) *QAReport

type ValidatorPkg added in v0.1.0

type ValidatorPkg struct {
	Name    string
	Bundles []ValidatorReportBundle
}

type ValidatorReport added in v0.1.0

type ValidatorReport struct {
	ImageName   string
	ImageID     string
	ImageHash   string
	ImageBuild  string
	GeneratedAt string
	FilterBy    string
	Packages    []ValidatorPkg
}

func NewValidatorReport added in v0.1.0

func NewValidatorReport(bundlesReport bundles.Report, filterPkg, filterValidator string) *ValidatorReport

nolint:dupl

type ValidatorReportBundle added in v0.1.0

type ValidatorReportBundle struct {
	BundleData  bundles.Column
	Validations []string
}

Jump to

Keyboard shortcuts

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