utils

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B64EncodeFile added in v0.0.4

func B64EncodeFile(file string) (string, error)

B64EncodeFile returns the base64 encoding of a file as a string. The file must be a full path

func CheckPreReqs

func CheckPreReqs(lastinstalldir string, gitOpsController string) (bool, error)

CheckPreReqs() checks to see if you have the proper CLI tools installed

func CopyDir

func CopyDir(source string, dest string) error

CopyDir copies a directory from one place to another

func CopyFile

func CopyFile(source string, dest string) error

CopyFile copies one file to another

func CreateWorkDir

func CreateWorkDir() (string, error)

CreateWorkDir creates a temp dir to store all the things we need

func DownloadFile

func DownloadFile(file string, url string) (bool, error)

DownloadFile will download a url to a local file. It's like WGET

func RunKustomize added in v0.0.5

func RunKustomize(dir string, outfile string) (bool, error)

RunKustomize runs kustomize on a specific dir and outputs it to a YAML to use for later

func SplitYamls

func SplitYamls(dir string, yaml string, spliton string) error

SplitYamls takes a multi-part YAML file and splits it into multiple files in the specified directory splitting on the string given

func WriteTemplate

func WriteTemplate(tpl string, fileToCreate string, vars interface{}) (bool, error)

WriteTemplate is a generic template writing mechanism

func WriteYamlOutput

func WriteYamlOutput(printer client.YamlPrinter, file string) error

WriteYamlOutput writes YAML to the specified file path

Types

This section is empty.

Jump to

Keyboard shortcuts

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