variable

package
v3.10.0-0.46.0+incompa... Latest Latest
Warning

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

Go to latest
Published: May 15, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// defaultImagePrefix is the default prefix for any container image names.
	// This value should be set duing build via -ldflags.
	DefaultImagePrefix string
)

Functions

func Empty

func Empty(s string) (string, bool)

Empty is a KeyFunc which always returns true and the empty string.

func Env

func Env(key string) (string, bool)

Env is a KeyFunc which always returns a string

func Expand

func Expand(s string, fns ...KeyFunc) string

Expand expands a string and ignores any errors that occur - keys that are not recognized are replaced with the empty string.

func ExpandStrict

func ExpandStrict(s string, fns ...KeyFunc) (string, error)

ExpandStrict expands a string using a series of common format functions

func Identity

func Identity(key string) (string, bool)

Identity is a KeyFunc that returns the same format rules.

func Versions

func Versions(key string) (string, bool)

Versions is a KeyFunc for retrieving information about the current version.

Types

type ImageTemplate added in v0.3.2

type ImageTemplate struct {
	// Format is required, set to the image template to pull
	Format string
	Latest bool
	// EnvFormat is optional, if set will substitute the value of ${component} with any env
	// var that matches this format. Is a printf format string accepting a single
	// string parameter.
	EnvFormat string
}

ImageTemplate is a class to assist in expanding parameterized Docker image references from configuration or a file

func NewDefaultImageTemplate added in v0.3.2

func NewDefaultImageTemplate() ImageTemplate

NewDefaultImageTemplate returns the default image template

func (*ImageTemplate) Expand added in v0.3.2

func (t *ImageTemplate) Expand(component string) (string, error)

Expand expands a string using a series of common format functions

func (*ImageTemplate) ExpandOrDie added in v0.3.2

func (t *ImageTemplate) ExpandOrDie(component string) string

ExpandOrDie will either expand a string or exit in case of failure

type KeyFunc

type KeyFunc func(key string) (string, bool)

KeyFunc returns the value associated with the provided key or false if no such key exists.

Jump to

Keyboard shortcuts

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