utils

package
v0.0.0-...-c143c6f Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YesNo  int = 0
	Choice int = 1
)

Variables

View Source
var Esc = "\x1b"

Functions

func AddtoPath

func AddtoPath(des string) string

func CheckDocker

func CheckDocker(verbose bool) bool

func CheckHelm

func CheckHelm(verbose bool) bool

func CheckK8sConnection

func CheckK8sConnection(verbose bool) (string, bool)

func CheckKubectl

func CheckKubectl(verbose bool) bool

func CheckMinikube

func CheckMinikube(verbose bool) bool

func ColorBlue

func ColorBlue() string

func ColorCyan

func ColorCyan() string

func ColorGreen

func ColorGreen() string

func ColorPurple

func ColorPurple() string

func ColorRed

func ColorRed() string

func ColorReset

func ColorReset() string

func ColorWhite

func ColorWhite() string

func ColorYellow

func ColorYellow() string

func Get

func Get(url string, username string, password string, objType string, path string, docType string, objName string) ([]interface{}, error)

func GetInput

func GetInput(message string, choices []string, questionType int) int64

func InstallDocker

func InstallDocker(verbose bool) bool

func Login

func Login(url string, username string, password string) (string, error)

func Remove

func Remove(url string, username string, password string, objType string, objName string) error

func RunCommand

func RunCommand(message string, successMessage string, showOutput bool, name string, args ...string) (string, string, error)

func RunCommandNoCapture

func RunCommandNoCapture(message string, successMessage string, name string, args ...string) (string, error)

func RunCommandWithRetry

func RunCommandWithRetry(message string, successMessage string, showOutput bool, debug bool, name string, args ...string) (string, string, error)

func Unzip

func Unzip(src, dest string, isStructured bool) error

func Upsert

func Upsert(url string, username string, password string, objType string, objName string, payload []byte) error

Types

type YamlArtifact

type YamlArtifact struct {
	APIVersion string                 `json:"apiVersion"`
	Kind       string                 `json:"kind"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
	Spec       interface{}            `json:"spec"`
}

Jump to

Keyboard shortcuts

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