Documentation
¶
Index ¶
- Constants
- Variables
- func BuildMapBundlesPerChannels(bundlesPerPkg []bundles.Column) map[string][]bundles.Column
- func GetHeadOfChannelState(headOfChannels []bundles.Column) bool
- func GetHeadOfChannels(bundlesOfPackage []bundles.Column) []bundles.Column
- func GetLatestBundlesVersions(bundlesPerChannels map[string][]bundles.Column) []bundles.Column
- func GetMaxOCPValue(b bundles.Column) string
- func GetTheLatestBundleVersion(bundlesFromChannel []bundles.Column) string
- func MapBundlesPerPackage(bundlesReport bundles.Report) map[string][]bundles.Column
- func MapPkgsComplyingWithDeprecateAPI122(mapPackagesWithBundles map[string][]bundles.Column) map[string][]bundles.Column
- func ParseBundlesJSONReport() (bundles.Report, error)
- type APIDashReport
- type BindFlags
- type GradeReport
- type MaxDashReport
- type Migrated
- type NotMigrated
- type NotOK
- type OK
- type PackageGrade
Constants ¶
const BLACK = "black"
const DEPRECATED_API_COMPLY = "COMPLY"
nolint:golint
const DEPRECATED_API_NOT_COMPLY = "NOT COMPLY"
nolint:golint
const ERRORS = "ONLY ERRORS"
nolint:golint
const ERRORS_WARNINGS = "ERRORS AND WARNINGS"
nolint:golint
const FOUND = "FOUND"
nolint:golint
const GREEN = "green"
const NOT_USED = "NOT USED"
nolint:golint
const ORANGE = "orange"
const PASS = "PASS"
nolint:golint
const RED = "red"
const USED = "USED"
nolint:golint
const WARNINGS = "ONLY WARNINGS"
nolint:golint
const YELLOW = "#ec8f1c"
Variables ¶
var Flags = BindFlags{}
Functions ¶
func BuildMapBundlesPerChannels ¶
BuildMapBundlesPerChannels returns a map of bundles per packages
func GetHeadOfChannelState ¶
GetHeadOfChannelState returns the qtd. of head of channels which are OK and configured with max ocp version
func GetLatestBundlesVersions ¶
GetQtLatestVersionChannelsState returns the qtd. of channels which are OK and configured with max ocp version
func GetMaxOCPValue ¶
GetMaxOCPValue returns the Max OCP annotation find on the bundle or an string not set to define that it was not set
func GetTheLatestBundleVersion ¶
GetTheLatestBundleVersion returns the latest/upper semversion
func MapBundlesPerPackage ¶
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 ¶
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 NotMigrated ¶
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
}