Documentation ¶
Index ¶
- func BashWrap(cmd string) string
- func ChmodX(filePath string) (string, error)
- func DoOrDie(err error)
- func DoOrDieWithMsg(err error, msg string)
- func FinishRunning(stepName string, cmd *exec.Cmd) (bool, string, string)
- func GenerateRandomString(length int) string
- func GetExecCommandFromString(fullCmd string) *exec.Cmd
- func GetFilesAndDirectories(path string) (string, []string, []string, error)
- func GetHomeDir() string
- func ParseImageName(image string) string
- func ParseImageRepo(image string) string
- func ParseImageTag(image string) string
- func RunBash(stepName, bashFragment string) bool
- func RunBashWithOutputs(stepName, bashFragment string) (bool, string, string)
- func RunCommand(cmd *exec.Cmd) (string, error)
- func RunCommandAndCaptureProgress(cmd *exec.Cmd) error
- func RunCommandBasedOnLoggingLevel(cmd *exec.Cmd) error
- func RunRawBash(stepName, bashFragment string) bool
- func RunRawBashWithOutputs(stepName, bash string) (bool, string, string)
- func SanitizeString(name string) string
- func SetUpLogger(logLevelStr string) error
- func ValidateFullImageString(image string) bool
- func ValidateImageVersion(version string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoOrDieWithMsg ¶
func GenerateRandomString ¶
TODO: explore https://github.com/oklog/ulid
func GetFilesAndDirectories ¶
func GetHomeDir ¶
func GetHomeDir() string
func ParseImageName ¶
ParseImageName takes a docker image string and returns the name image := "docker.io/blackducksoftware/synopsys-operator:latest" subMatch = [blackducksoftware/synopsys-operator:latest docker.io/blackducksoftware/ synopsys-operator :latest]
func ParseImageRepo ¶
ParseImageRepo takes a docker image string and returns the repo image := "docker.io/blackducksoftware/synopsys-operator:latest" subMatch = [blackducksoftware/synopsys-operator:latest docker.io/blackducksoftware/ synopsys-operator :latest]
func ParseImageTag ¶
ParseImageTag takes a docker image string and returns the tag image := "docker.io/blackducksoftware/synopsys-operator:latest" subMatch = [blackducksoftware/synopsys-operator:latest latest]
func RunBashWithOutputs ¶
func RunCommandAndCaptureProgress ¶
RunCommandAndCaptureProgress runs a long running command and continuously streams its output
func RunRawBash ¶
func RunRawBashWithOutputs ¶
Runs the provided bash without wrapping it in any kubernetes-specific gunk.
func SanitizeString ¶
func SetUpLogger ¶
func ValidateFullImageString ¶
ValidateFullImageString takes a docker image string and verifies a repo, name, and tag were all provided image := "docker.io/blackducksoftware/synopsys-operator:latest" subMatch = [blackducksoftware/synopsys-operator:latest blackducksoftware synopsys-operator latest]
func ValidateImageVersion ¶
ValidateImageVersion takes a docker image version string and verifies that it follows the format x.x.x version := "2019.4.2" subMatch = [2019.4.2 2019 4 2]
Types ¶
This section is empty.