utils

package
v0.0.0-...-534dfd5 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorTooLowKubectlVersion = errors.New("kubectl version is too low")

Functions

func CheckAWSIAMAuthPrereq

func CheckAWSIAMAuthPrereq() error

func CheckKubectlOidcLoginPrereq

func CheckKubectlOidcLoginPrereq() error

func CheckKubectlPrereq

func CheckKubectlPrereq() error

func CheckKubeloginPrereq

func CheckKubeloginPrereq() error

func FormatCommand

func FormatCommand(cmd *cobra.Command)

func FormatUse

func FormatUse(use string) string

func RegexFilter

func RegexFilter(options []string, regexString string) ([]string, error)

RegexFilter to filter a slice or strings based on a regex filter passed to it. Returns an error if regex is invalid

func SurveyFilter

func SurveyFilter(filter string, value string, index int) bool

SurveyFilter a function for passing to AlecAivazis/survey, which will allow wildcards(*) and whitespace to be used for subfilter values

Types

type KubectlVersion

type KubectlVersion struct {
	ClientVersion struct {
		Major      string `json:"major"`
		Minor      string `json:"minor"`
		GitVersion string `json:"gitVersion"`
	} `json:"clientVersion"`
}

Jump to

Keyboard shortcuts

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