utils

package
v1.7.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2015 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureTCPTransport added in v1.7.0

func ConfigureTCPTransport(tr *http.Transport, proto, addr string)

func DigestReference added in v1.6.0

func DigestReference(ref string) bool

DigestReference returns true if ref is a digest reference; i.e. if it is of the form <algorithm>:<digest>.

func DockerInitPath added in v0.6.5

func DockerInitPath(localCopy string) string

Figure out the path of our dockerinit (which may be SelfPath())

func ExperimentalBuild added in v1.7.0

func ExperimentalBuild() bool

func GetCallerName added in v0.6.7

func GetCallerName(depth int) string

GetCallerName introspects the call stack and returns the name of the function `depth` levels down in the stack.

func GitClone added in v1.7.0

func GitClone(remoteURL string) (string, error)

func ImageReference added in v1.6.0

func ImageReference(repo, ref string) string

ImageReference combines `repo` and `ref` and returns a string representing the combination. If `ref` is a digest (meaning it's of the form <algorithm>:<digest>, the returned string is <repo>@<ref>. Otherwise, ref is assumed to be a tag, and the returned string is <repo>:<tag>.

func ReadDockerIgnore added in v1.5.0

func ReadDockerIgnore(path string) ([]string, error)

Reads a .dockerignore file and returns the list of file patterns to ignore. Note this will trim whitespace from each line as well as use GO's "clean" func to get the shortest/cleanest path for each.

func ReplaceOrAppendEnvValues added in v0.9.0

func ReplaceOrAppendEnvValues(defaults, overrides []string) []string

ReplaceOrAppendValues returns the defaults with the overrides either replaced by env key or appended to the list

func SelfPath

func SelfPath() string

Figure out the absolute path of our own binary (if it's still around).

func TestDirectory added in v0.6.7

func TestDirectory(templateDir string) (dir string, err error)

TestDirectory creates a new temporary directory and returns its path. The contents of directory at path `templateDir` is copied into the new directory.

func ValidateContextDirectory added in v0.12.0

func ValidateContextDirectory(srcPath string, excludes []string) error

ValidateContextDirectory checks if all the contents of the directory can be read and returns an error if some files can't be read symlinks which point to non-existing files don't trigger an error

Types

This section is empty.

Jump to

Keyboard shortcuts

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