Documentation
¶
Index ¶
- Variables
- func CheckHostName(hostname string) bool
- func ColorPrintYAML(text string)
- func CreateDirectory(path string, mode os.FileMode) error
- func CreateFilePath(destination string)
- func CreatePathAndCopy(source string, destination string)
- func Download(url string) []byte
- func DownloadToFile(url string, target string)
- func ExecCommand(envVariables []string, commandName string, args ...string) (string, error)
- func Fetch(url string) io.ReadCloser
- func GeneratePKI(config PKIConfig)
- func GetHtpasswdString(username string, password string) (string, error)
- func GetSha256Sum(path string) (string, error)
- func GetValidComponents(allComponents []config.ZarfComponent, requestedComponentNames []string) []config.ZarfComponent
- func HandlePKI(config PKIConfig)
- func InjectServerCert(pkiConfig PKIConfig)
- func InvalidPath(path string) bool
- func IsAMD64() bool
- func IsLinux() bool
- func IsRHEL() bool
- func IsUrl(source string) bool
- func IsUserRoot() bool
- func IsValidHostName() bool
- func ListDirectories(directory string) []string
- func Login(serverAddress string, user string, password string) error
- func MakeTempDir() string
- func RandomString(length int) string
- func RecursiveFileList(root string) []string
- func ReplaceText(path string, old string, new string)
- func RunPreflightChecks()
- func ValidateSha256Sum(expectedChecksum string, path string)
- func VerifyBinary(binary string) bool
- func WriteFile(path string, data []byte)
- type PKIConfig
Constants ¶
This section is empty.
Variables ¶
var TempPathPrefix = "zarf-"
Functions ¶
func CheckHostName ¶
func ColorPrintYAML ¶
func ColorPrintYAML(text string)
func CreateFilePath ¶
func CreateFilePath(destination string)
func CreatePathAndCopy ¶
func DownloadToFile ¶
func ExecCommand ¶
ExecCommand performs a process execution outside of Go
func Fetch ¶
func Fetch(url string) io.ReadCloser
func GeneratePKI ¶
func GeneratePKI(config PKIConfig)
GeneratePKI create a CA and signed server keypair
func GetHtpasswdString ¶
GetHtpasswdString converts a username and password to a properly formatted and hashed format for `htpasswd`
func GetSha256Sum ¶
GetSha256Sum returns the computed SHA256 Sum of a given file
func GetValidComponents ¶
func GetValidComponents(allComponents []config.ZarfComponent, requestedComponentNames []string) []config.ZarfComponent
func InjectServerCert ¶
func InjectServerCert(pkiConfig PKIConfig)
func IsUserRoot ¶
func IsUserRoot() bool
func IsValidHostName ¶
func IsValidHostName() bool
func ListDirectories ¶
func Login ¶
Login adds the given creds to the user's Docker config, usually located at $HOME/.docker/config.yaml. It does not try to connect to the given registry, it just simply adds another entry to the config file. This function was mostly adapted from https://github.com/google/go-containerregistry/blob/5c9c442d5d68cd96787559ebf6e984c7eb084913/cmd/crane/cmd/auth.go
func MakeTempDir ¶
func MakeTempDir() string
func RandomString ¶
func RecursiveFileList ¶
func ReplaceText ¶
func RunPreflightChecks ¶
func RunPreflightChecks()
func ValidateSha256Sum ¶
func VerifyBinary ¶
VerifyBinary returns true if binary is available