utils

package
v0.0.0-...-7013275 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DryRun dryRun

DryRun holds dryRun information.

Functions

func BuildHash

func BuildHash(alg string, reader io.Reader) (string, error)

BuildHash returns the hash of a local file.

func BuildURLHash

func BuildURLHash(alg, url string) (string, error)

BuildURLHash return the hash of a remote file.

func NormalizeNewlines

func NormalizeNewlines(s string) string

NormalizeNewlines removes any newlines from a string.

func ParseYamlFile

func ParseYamlFile(path string, data interface{})

ParseYamlFile parses a yaml file

func Run

func Run(args ...string) (string, error)

Run executes a git command and returns the result.

func Template

func Template(tplStr string, cfg config.LetItGoConfig, data ...interface{}) (string, error)

Template is a wrapper to standardize templating.

func TemplateProperty

func TemplateProperty(v *string, ctx interface{}, cfg *config.LetItGoConfig)

TemplateProperty takes a property as a template and interpolates any variable.

func WriteFile

func WriteFile(path, content string) error

WriteFile is a safe way to write to a file, adhering to dryRun.

Types

type GitURI

type GitURI struct {
	Host  string
	Owner string
	Repo  string
}

GitURI represents a git URL.

func ParseURI

func ParseURI(uri string) (*GitURI, error)

ParseURI returns a GitURL.

type Helm

type Helm struct{}

Helm provices a wrapper for all helm interactions.

func (*Helm) Package

func (h *Helm) Package(chart, target, version string) error

Package uses the helm binary to package a chart.

func (*Helm) Publish

func (h *Helm) Publish(artifact, repository string) error

Publish pushes an packages chart to a given repository.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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