custom

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 8 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 = "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 ORANGE = "orange"
View Source
const PASS = "PASS"

nolint:golint

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

nolint:golint

View Source
const WARNINGS = "ONLY WARNINGS"

nolint:golint

View Source
const YELLOW = "#ec8f1c"

Variables

View Source
var Flags = BindFlags{}

Functions

func BuildMapBundlesPerChannels

func BuildMapBundlesPerChannels(bundlesPerPkg []bundles.Column) map[string][]bundles.Column

BuildMapBundlesPerChannels returns a map of bundles per packages

func GetHeadOfChannelState

func GetHeadOfChannelState(headOfChannels []bundles.Column) bool

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

func GetHeadOfChannels

func GetHeadOfChannels(bundlesOfPackage []bundles.Column) []bundles.Column

func GetLatestBundlesVersions

func GetLatestBundlesVersions(bundlesPerChannels map[string][]bundles.Column) []bundles.Column

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

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 GetTheLatestBundleVersion

func GetTheLatestBundleVersion(bundlesFromChannel []bundles.Column) string

GetTheLatestBundleVersion returns the latest/upper semversion

func MapBundlesPerPackage

func MapBundlesPerPackage(bundlesReport bundles.Report) map[string][]bundles.Column

MapBundlesPerPackage returns map with all bundles found per pkg name

func MapPkgsComplyingWithDeprecateAPI122

func MapPkgsComplyingWithDeprecateAPI122(
	mapPackagesWithBundles map[string][]bundles.Column) map[string][]bundles.Column

(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

Types

type APIDashReport

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

func NewAPIDashReport

func NewAPIDashReport(bundlesReport bundles.Report) *APIDashReport

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

type BindFlags

type BindFlags struct {
	File       string `json:"file"`
	Template   string `json:"template"`
	OutputPath string `json:"outputPath"`
}

BindFlags define the Flags used to generate the bundle report

type GradeReport

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

func NewGradeReport

func NewGradeReport(bundlesReport bundles.Report) *GradeReport

type MaxDashReport

type MaxDashReport struct {
	ImageName   string
	ImageID     string
	ImageHash   string
	ImageBuild  string
	OK          []OK
	NotOK       []NotOK
	GeneratedAt string
}

func NewMaxDashReport

func NewMaxDashReport(bundlesReport bundles.Report) *MaxDashReport

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

type Migrated

type Migrated struct {
	Name            string
	Kinds           []string
	Bundles         []string
	Channels        []string
	BundlesMigrated []string
	AllBundles      []bundles.Column
}

type NotMigrated

type NotMigrated struct {
	Name            string
	Kinds           []string
	Channels        []string
	Bundles         []string
	BundlesMigrated []string
	AllBundles      []bundles.Column
}

type NotOK

type NotOK struct {
	Name            string
	Kinds           []string
	Channels        []string
	Bundles         []string
	BundlesMigrated []string
	AllBundles      []bundles.Column
}

type OK

type OK struct {
	Name            string
	Kinds           []string
	Bundles         []string
	Channels        []string
	BundlesMigrated []string
	AllBundles      []bundles.Column
}

type PackageGrade

type PackageGrade struct {
	PackageName                 string
	DeprecateAPI                string
	DeprecateAPIColor           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
	Score                       int
	Grade                       string
	ChannelNamesNotComply       []string
	BundlesWithoutDisconnect    []string
	HeadOfChannels              []bundles.Column
}

func NewPkgGrade

func NewPkgGrade(pkgName string, bundlesOfPkg []bundles.Column,
	notMigrated, migrated map[string][]bundles.Column) PackageGrade

Jump to

Keyboard shortcuts

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