util

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateYaml

func GenerateYaml(path string, data interface{}) (err error)

func ValidatePath

func ValidatePath(wd string, p *string) error

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(name string) *Cmd

func (*Cmd) Arg

func (c *Cmd) Arg(name, v string) *Cmd

func (*Cmd) Args

func (c *Cmd) Args(args ...string) *Cmd

func (Cmd) Base

func (c Cmd) Base() *Cmd

func (Cmd) Command

func (c Cmd) Command() []string

func (*Cmd) Cwd

func (c *Cmd) Cwd(path string) *Cmd

func (*Cmd) Env

func (c *Cmd) Env(env ...string) *Cmd

func (*Cmd) ListArg

func (c *Cmd) ListArg(name string, vs []string) *Cmd

func (*Cmd) NoWait

func (c *Cmd) NoWait() *Cmd

func (*Cmd) PostEnd

func (c *Cmd) PostEnd(f func() error) *Cmd

func (*Cmd) PostStart

func (c *Cmd) PostStart(f func() error) *Cmd

func (*Cmd) PreStart

func (c *Cmd) PreStart(f func() error) *Cmd

func (*Cmd) Run

func (c *Cmd) Run() (string, error)

func (*Cmd) Stderr

func (c *Cmd) Stderr(w io.Writer) *Cmd

func (*Cmd) Stdin

func (c *Cmd) Stdin(r io.Reader) *Cmd

func (*Cmd) Stdout

func (c *Cmd) Stdout(w io.Writer) *Cmd

func (*Cmd) Timeout

func (c *Cmd) Timeout(t time.Duration) *Cmd

type DockerCmd

type DockerCmd struct {
	Cmd
	Options []string
}

func NewDockerCommand

func NewDockerCommand() *DockerCmd

func (*DockerCmd) Build

func (c *DockerCmd) Build(workDir string) *Cmd

func (*DockerCmd) Push

func (c *DockerCmd) Push(image, tag string) (string, error)

type GoCmd

type GoCmd struct {
	Cmd
}

func NewGoCommand

func NewGoCommand() *GoCmd

func (GoCmd) Build

func (c GoCmd) Build(workDir, output, input string, flags ...string) *Cmd

type HelmCmd

type HelmCmd struct {
	Cmd
}

func NewHelmCommand

func NewHelmCommand() *HelmCmd

func (HelmCmd) Package

func (c HelmCmd) Package(chart, chartPath, destPath string) (string, error)

func (HelmCmd) UpdateDependency

func (c HelmCmd) UpdateDependency(chart, chartPath string) (string, error)

type KubeCmd

type KubeCmd struct {
	Cmd
}

func NewKubeCommand

func NewKubeCommand() *KubeCmd

func (KubeCmd) CopyToPod

func (c KubeCmd) CopyToPod(pod, container, source, destination string) *Cmd

func (KubeCmd) CreateConfigMap

func (c KubeCmd) CreateConfigMap(name string, keyMap map[string]string) (string, error)

func (KubeCmd) CreateConfigMapFromFile

func (c KubeCmd) CreateConfigMapFromFile(name, path string) (string, error)

func (KubeCmd) DeleteConfigMap

func (c KubeCmd) DeleteConfigMap(name string) (string, error)

func (KubeCmd) DeleteService

func (c KubeCmd) DeleteService(service string) *Cmd

func (KubeCmd) ExecPod

func (c KubeCmd) ExecPod(pod, container string, cmd []string) *Cmd

func (KubeCmd) ExecShell

func (c KubeCmd) ExecShell(resource, path string) *Cmd

func (KubeCmd) ExposePod

func (c KubeCmd) ExposePod(pod string, host string, port int) *Cmd

func (KubeCmd) GetConfigMapKey

func (c KubeCmd) GetConfigMapKey(name, key string) (string, error)

func (KubeCmd) GetContainers

func (c KubeCmd) GetContainers(deployment v1.Deployment) []string

func (KubeCmd) GetDeployment

func (c KubeCmd) GetDeployment(deployment string) (*v1.Deployment, error)

func (KubeCmd) GetDeployments

func (c KubeCmd) GetDeployments() ([]string, error)

func (KubeCmd) GetMostRecentPodBySelectors

func (c KubeCmd) GetMostRecentPodBySelectors(selectors map[string]string) (string, error)

func (KubeCmd) GetNamespaces

func (c KubeCmd) GetNamespaces() ([]string, error)

func (KubeCmd) GetPods

func (c KubeCmd) GetPods(selectors map[string]string) ([]string, error)

func (KubeCmd) GetPodsByLabels

func (c KubeCmd) GetPodsByLabels(labels []string) ([]string, error)

func (KubeCmd) PatchDeployment

func (c KubeCmd) PatchDeployment(patch, deployment string) *Cmd

func (KubeCmd) RestartDeployment

func (c KubeCmd) RestartDeployment(deployment string) *Cmd

func (KubeCmd) RollbackDeployment

func (c KubeCmd) RollbackDeployment(deployment string) *Cmd

func (KubeCmd) WaitForPodState

func (c KubeCmd) WaitForPodState(pod, condition, timeout string) *Cmd

func (KubeCmd) WaitForRollout

func (c KubeCmd) WaitForRollout(deployment, timeout string) *Cmd

Jump to

Keyboard shortcuts

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