Documentation
¶
Overview ¶
Package utils is for commonly used functions
Index ¶
- func FilterDebianLinux(h *cluster.ZarfHost) bool
- func FilterEngineAlreadyPopulated(h *cluster.ZarfHost) bool
- func FilterEnterpriseLinux(h *cluster.ZarfHost) bool
- func IdentifySource(src string) (string, error)
- func IsDebianLinux(con os.Configurer) bool
- func IsEnterpriseLinux(con os.Configurer) bool
- func PrintJSON(obj any) string
- func RandomString(length int) (string, error)
- func ReadByteStrict(data []byte, destConfig any) error
- func ReadYAMLStrict(path string, destConfig any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterDebianLinux ¶
FilterDebianLinux is a function used to filter whether a host is a Debian based OS
func FilterEngineAlreadyPopulated ¶
FilterEngineAlreadyPopulated is a function used to filter whether a host already has distro files populated
func FilterEnterpriseLinux ¶
FilterEnterpriseLinux is a function used to filter whether a host is an Enterprise Linux OS
func IdentifySource ¶
IdentifySource returns the source type for the given source string.
func IsDebianLinux ¶
func IsDebianLinux(con os.Configurer) bool
IsDebianLinux is true if the os.Configurer is of a type of Debian based OS
func IsEnterpriseLinux ¶
func IsEnterpriseLinux(con os.Configurer) bool
IsEnterpriseLinux is true if the os.Configurer is of a type of Enterprise Linux
func RandomString ¶
RandomString returns a string of hexadecimal characters of a given length that is cryptographically secure, or an error
func ReadByteStrict ¶
ReadByteStrict reads a byte array and tries to place it in the provided "destConfig" object
func ReadYAMLStrict ¶
ReadYAMLStrict reads a YAML file into a struct, with strict parsing
Types ¶
This section is empty.