util

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 19 Imported by: 37

Documentation

Index

Constants

View Source
const (
	WorkerThreads               = 50
	SemVerK8sVersion122OrHigher = ">=1.22.0-rancher0"
)

Variables

View Source
var ProxyEnvVars = [3]string{"HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY"}

Functions

func CleanWindowsPath added in v1.1.5

func CleanWindowsPath(s string) string

func CopyFileWithPrefix added in v1.2.5

func CopyFileWithPrefix(originalFile, prefixDestFile string) error

func ECRCredentialPlugin added in v1.3.0

func ECRCredentialPlugin(plugin *v3.ECRCredentialPlugin, pr string) (authConfig types.AuthConfig, err error)

ECRCredentialPlugin is a wrapper to generate ECR token using the AWS Credentials

func ErrList added in v0.1.18

func ErrList(e []error) error

func GetDefaultRKETools added in v0.2.0

func GetDefaultRKETools(image string) (string, error)

func GetEnvVar added in v0.3.0

func GetEnvVar(key string) (string, string, bool)

GetEnvVar will lookup a given environment variable by key and return the key and value (to show what case got matched) with uppercase key being preferred

func GetImageTagFromImage added in v0.2.3

func GetImageTagFromImage(image string) (string, error)

func GetObjectQueue added in v0.1.18

func GetObjectQueue(l interface{}) chan interface{}

func GetTagMajorVersion added in v0.1.17

func GetTagMajorVersion(tag string) string

func IsFileExists added in v0.2.3

func IsFileExists(filePath string) (bool, error)
func IsSymlink(file string) (bool, error)

func PrintProxyEnvVars added in v0.3.0

func PrintProxyEnvVars()

func RemoveZFromBinds added in v1.3.3

func RemoveZFromBinds(binds []string) []string

func ReplaceFileWithBackup added in v1.2.5

func ReplaceFileWithBackup(originalFile, prefixBackupFile string) error

func SemVerMatchRange added in v1.3.3

func SemVerMatchRange(k8sVersion, versionRange string) (bool, error)

func StrToSemVer

func StrToSemVer(version string) (*semver.Version, error)

func StripPasswordFromURL added in v0.3.0

func StripPasswordFromURL(URL string) (string, error)

func UniqueStringSlice added in v0.2.0

func UniqueStringSlice(elements []string) []string

UniqueStringSlice - Input slice, retrun slice with unique elements. Will not maintain order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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