pkg

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

Documentation

Index

Constants

View Source
const DefaultContainerTool = Docker
View Source
const Docker = "docker"
View Source
const InfrastructureAnnotation = "operators.openshift.io/infrastructure-features"
View Source
const JSON = "json"
View Source
const No = "NO"
View Source
const Podman = "podman"
View Source
const Yes = "YES"

Variables

This section is empty.

Functions

func CleanupTemporaryDirs

func CleanupTemporaryDirs()

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 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 RangeContainsVersion added in v0.1.0

func RangeContainsVersion(r string, v string, tolerantParse bool) (bool, error)

RangeContainsVersion expected the range and the targetVersion version and returns true when the targetVersion version contains in the range

func ReadFile

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

ReadFile will return the bites of file

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 DockerInspect added in v0.1.0

type DockerInspect 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) (DockerInspect, error)

type DockerManifestInspect added in v0.1.0

type DockerManifestInspect struct {
	ManifestData []ManifestData `json:"manifests"`
}

func RunDockerManifestInspect added in v0.1.0

func RunDockerManifestInspect(image string, containerEngine string) (DockerManifestInspect, error)

type ManifestData added in v0.1.0

type ManifestData struct {
	Platform Platform `json:"platform"`
}

type Platform added in v0.1.0

type Platform struct {
	Architecture string `json:"architecture"`
	OS           string `json:"os"`
}

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