pkg

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const All = "all"
View Source
const DefaultContainerTool = Docker
View Source
const Docker = "docker"
View Source
const JSON = "json"
View Source
const No = "NO"
View Source
const NotUsed = "NOT USED"
View Source
const Podman = "podman"
View Source
const TableFormat = `` /* 195-byte string literal not displayed */
View Source
const Unknown = "UNKNOWN"
View Source
const Xls = "xls"
View Source
const Yes = "YES"

Variables

This section is empty.

Functions

func CleanupTemporaryDirs

func CleanupTemporaryDirs()

func GenerateMessageWithDeprecatedAPIs

func GenerateMessageWithDeprecatedAPIs(deprecatedAPIs map[string][]string) string

generateMessageWithDeprecatedAPIs will return a list with the kind and the name of the resource which were found and required to be upgraded

func GenerateTemporaryDirs

func GenerateTemporaryDirs()

func GetContainerToolFromEnvVar

func GetContainerToolFromEnvVar() string

GetContainerToolFromEnvVar retrieves the value of the environment variable and defaults to docker when not set

func GetFormatArrayWithBreakLine

func GetFormatArrayWithBreakLine(array []string) string

GetFormatArray return the values without duplicates and in a string such as "v","v"...

func GetRemovedAPIsOn1_22From

func GetRemovedAPIsOn1_22From(bundle *manifests.Bundle) map[string][]string

nolint:gocyclo Note that the following code is the same present in the operator-framework/api getRemovedAPIsOn1_22From return the list of resources which were deprecated and are no longer be supported in 1.22. More info: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22

func GetReportName

func GetReportName(imageName, typeName, typeFile string) string

func GetUniqueValues

func GetUniqueValues(array []string) []string

GetUniqueValues return the values without duplicates

func GetYesOrNo

func GetYesOrNo(value bool) string

GetYesOrNo return the text yes for true values and No for false one.

func HasClusterRunning

func HasClusterRunning() bool

HasClusterRunning will return true when is possible to check that the env has a cluster running

func HasSDKInstalled

func HasSDKInstalled() bool

HasSDKInstalled will return true when find an SDK version installed

func IsFollowingChannelNameConventional

func IsFollowingChannelNameConventional(channel string) bool

IsFollowingChannelNameConventional will check the channels.

func IsMaxOCPVersionLowerThan49

func IsMaxOCPVersionLowerThan49(maxOCPVersion string) bool

func IsOcpLabelRangeLowerThan49

func IsOcpLabelRangeLowerThan49(ocpLabel string) bool

IsOcpLabelRangeLowerThan49 returns true if the range < 4.9

func ReadFile

func ReadFile(file string) ([]byte, error)

ReadFile will return the bites of file

func RemovedAPIsKind

func RemovedAPIsKind(deprecatedAPIs map[string][]string) []string

RemovedAPIsKind return a list with all Kinds found

func RunCommand

func RunCommand(cmd *exec.Cmd) ([]byte, error)

Run executes the provided command within this context

func WriteJSON

func WriteJSON(data []byte, imageName, outputPath, typeName string) error

Types

type DockerConfig

type DockerConfig struct {
	Labels map[string]string `json:"Labels"`
}

type DockerInspectManifest

type DockerInspectManifest struct {
	ID           string       `json:"ID"`
	RepoDigests  []string     `json:"RepoDigests"`
	Created      string       `json:"Created"`
	DockerConfig DockerConfig `json:"Config"`
}

func RunDockerInspect

func RunDockerInspect(image string, containerEngine string) (DockerInspectManifest, error)

type PropertiesAnnotation

type PropertiesAnnotation struct {
	Type  string
	Value string
}

PropertiesAnnotation used to Unmarshal the JSON in the CSV annotation

func (PropertiesAnnotation) String

func (p PropertiesAnnotation) String() string

Directories

Path Synopsis
reports

Jump to

Keyboard shortcuts

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