Documentation ¶
Index ¶
- Variables
- func Empty(s string) (string, bool)
- func Env(key string) (string, bool)
- func EnvPresent(key string) (string, bool)
- func Expand(s string, fns ...KeyFunc) string
- func ExpandStrict(s string, fns ...KeyFunc) (string, error)
- func Identity(key string) (string, bool)
- func Versions(key string) (string, bool)
- type ImageTemplate
- type KeyFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var OverrideVersion = version.Get()
OverrideVersion is the latest version, exposed for testing.
Functions ¶
func EnvPresent ¶
EnvPresent is a KeyFunc which returns an environment variable if it is present.
func Expand ¶
Expand expands a string and ignores any errors that occur - keys that are not recognized are replaced with the empty string.
func ExpandStrict ¶
ExpandStrict expands a string using a series of common format functions
Types ¶
type ImageTemplate ¶ added in v0.3.2
type ImageTemplate struct { // Required, set to the image template to pull Format string Latest bool // 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
func (*ImageTemplate) Expand ¶ added in v0.3.2
func (t *ImageTemplate) Expand(component string) (string, error)
func (*ImageTemplate) ExpandOrDie ¶ added in v0.3.2
func (t *ImageTemplate) ExpandOrDie(component string) string
Click to show internal directories.
Click to hide internal directories.