utils

package
v0.0.0-...-a761d9d Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllDependenciesSatisfied

func AllDependenciesSatisfied(taskData interface{}, taskStatus map[string]bool) bool

func ConvertStringListToIntList

func ConvertStringListToIntList(strList []string) ([]int, error)

func CopyDir

func CopyDir(src, dst, taskName string) error

func CopyFile

func CopyFile(src, dst string) error

func CopyInputFiles

func CopyInputFiles(inputs []string, hostHiveTaskInputDir string) error

func CopyMountFiles

func CopyMountFiles(mounts []string, hostHiveTaskInputDir, defaultHive string) error

func DownloadFile

func DownloadFile(source, destination string) error

func EnsurePathExists

func EnsurePathExists(path string) error

func FindLineNumber

func FindLineNumber(input, pattern string) int

func GenerateIntegerList

func GenerateIntegerList(start, end int) []int

func GetDirectorywithkeyword

func GetDirectorywithkeyword(input string) ([]string, error)

func GetHostHiveTaskDirectory

func GetHostHiveTaskDirectory(taskName, defaultHive string) (string, error)

func GetInputOutput

func GetInputOutput(source string) (string, string)

func GetInputOutputDocker

func GetInputOutputDocker(source string) (string, string)

func GetInterfaceVal

func GetInterfaceVal(taskData interface{}, value string) interface{}

func GetLogPaths

func GetLogPaths(stdoutDir, stderrDir, taskName string) (string, string)

func GetTimeout

func GetTimeout(taskData interface{}) time.Duration

func GeterrorLogPath

func GeterrorLogPath(source string) (string, string)

func ImageExists

func ImageExists(imageName string) (bool, error)

func InspectImageEntrypoint

func InspectImageEntrypoint(imageName string, defaultCmd string) ([]string, error)

func IsFolder

func IsFolder(path string) bool

func IsFolderExists

func IsFolderExists(path string) (bool, error)

func IsURL

func IsURL(str string) bool

func ParseDockerLogs

func ParseDockerLogs(reader io.Reader) ([]byte, []byte, error)

func PullDockerImage

func PullDockerImage(image string) error

func RandomString

func RandomString(length int) string

func ReadDynamicRangeFromFile

func ReadDynamicRangeFromFile(dynamicRange string) string

func ReadLinesFromFile

func ReadLinesFromFile(filePath string) ([]string, error)

func ReplaceDockerplaceholders

func ReplaceDockerplaceholders(command, dockerHive, dockerHiveTaskDir, hostHiveTaskDir, hostHiveTaskOutputDir, hostHiveTaskInputDir string) string

func ReplacePlaceholders

func ReplacePlaceholders(config *config.Config)

func ReplacePlaceholdersInString

func ReplacePlaceholdersInString(input string, vars map[string]string) string

Function to replace placeholders in a string

func ReplaceTaskPlaceholders

func ReplaceTaskPlaceholders(command, hive, mode string) string

func SanitizeTaskName

func SanitizeTaskName(taskName string) string

func UpdateConfigStruct

func UpdateConfigStruct(configStruct *config.Config, keyValueList []string) error

func WriteLogs

func WriteLogs(stdoutFile, stderrFile string, stdoutLogs, stderrLogs []byte) error

func WriteLogsToFile

func WriteLogsToFile(logs []byte, filePath string) error

Types

type Args

type Args struct {
	Workflow string
	YamlVars goflags.StringSlice
	Json     bool
	NoBanner bool
	Detailed bool
}

func ParseArgs

func ParseArgs() *Args

Jump to

Keyboard shortcuts

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