helpers

package
v0.29.1-geaaru Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChartFile

func ChartFile(s ...string) []*chart.File

ChartFile reads all the given files and returns a slice of []*chart.File containing the raw content and the file name for each file

func ChartFileB

func ChartFileB(s []byte) []*chart.File

ChartFileB is an helper that takes a slice of bytes and construct a chart.File slice from it

func ChartFileS

func ChartFileS(s string) []*chart.File

ChartFileS is an helper that takes a string and construct a chart.File slice from it

func ChartFiles

func ChartFiles(path []string) ([]*chart.File, error)

ChartFiles reads a list of paths and reads all yaml file inside. It returns a slice of pointers of chart.File(s) with the raw content of the yaml

func Contains

func Contains(s []string, e string) bool

func ContainsElem

func ContainsElem(a *[]string, e string) bool

func Exec

func Exec(cmd string, args []string, env []string) error

This allows a multi-platform switch in the future

func Factorial

func Factorial(n uint64) (result uint64)

func GetHomeDir

func GetHomeDir() (ans string)

func RenderFiles

func RenderFiles(files []*chart.File, valuesFile string, defaultFile ...string) (string, error)

func RenderHelm

func RenderHelm(files []*chart.File, values, d map[string]interface{}) (string, error)

RenderHelm renders the template string with helm

func StripRegistryFromImage

func StripRegistryFromImage(image string) string

func Tar

func Tar(src, dest string) error

func UnMarshalValues

func UnMarshalValues(values []string) (templatedata, error)

UnMarshalValues unmarshal values files and joins them into a unique templatedata the join happens from right to left, so any rightmost value file overwrites the content of the ones before it.

func Untar

func Untar(src, dest string, sameOwner, overwriteDirPerms bool) error

Untar just a wrapper around the docker functions

func UntarProtect

func UntarProtect(src, dst string, sameOwner, overwriteDirPerms bool, protectedFiles []string, modifier tarf.TarFileHandlerFunc) error

func UntarProtectSpec

func UntarProtectSpec(src, dst string, protectedFiles []string, modifier tarf.TarFileHandlerFunc, spec *tarf_specs.SpecFile) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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