util

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 14 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) BoolArg added in v1.6.3

func (c *Cmd) BoolArg(name string, v bool) *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(ctx context.Context) (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) *Cmd

type HelmCmd

type HelmCmd struct {
	Cmd
}

func NewHelmCommand

func NewHelmCommand() *HelmCmd

func (HelmCmd) Package

func (c HelmCmd) Package(ctx context.Context, chartPath, destPath string) (string, error)

func (HelmCmd) UpdateDependency

func (c HelmCmd) UpdateDependency(ctx context.Context, 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(ctx context.Context, name string, keyMap map[string]string) (string, error)

func (KubeCmd) CreateConfigMapFromFile

func (c KubeCmd) CreateConfigMapFromFile(ctx context.Context, name, path string) (string, error)

func (KubeCmd) DeleteConfigMap

func (c KubeCmd) DeleteConfigMap(ctx context.Context, 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(ctx context.Context, name, key string) (string, error)

func (KubeCmd) GetContainers

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

func (KubeCmd) GetDeployment

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

func (KubeCmd) GetDeployments

func (c KubeCmd) GetDeployments(ctx context.Context) ([]string, error)

func (KubeCmd) GetMostRecentPodBySelectors

func (c KubeCmd) GetMostRecentPodBySelectors(ctx context.Context, selectors map[string]string) (string, error)

func (KubeCmd) GetNamespaces

func (c KubeCmd) GetNamespaces(ctx context.Context) ([]string, error)

func (KubeCmd) GetPods

func (c KubeCmd) GetPods(ctx context.Context, selectors map[string]string) ([]string, error)

func (KubeCmd) GetPodsByLabels

func (c KubeCmd) GetPodsByLabels(ctx context.Context, 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