Documentation
¶
Index ¶
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func Init(dir string) (changed []string, err error)
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type Manifest
- func (m *Manifest) Build(app, dir string, cache bool) []error
- func (m *Manifest) MissingEnvironment() ([]string, error)
- func (m *Manifest) PortConflicts() ([]string, error)
- func (m *Manifest) PortsWanted() []string
- func (m *Manifest) Push(app, registry, auth, tag string, flatten string) []error
- func (m *Manifest) Raw() ([]byte, error)
- func (m *Manifest) Run(app string) []error
- func (m *Manifest) Write(filename string) error
- type ManifestEntry
Constants ¶
This section is empty.
Variables ¶
var ( Stdout = io.Writer(os.Stdout) Stderr = io.Writer(os.Stderr) Execer = exec.Command SignalWaiter = waitForSignal )
NOTE: these vars allow us to control other shell-outs during testing
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Manifest ¶
type Manifest map[string]ManifestEntry
func (*Manifest) MissingEnvironment ¶
func (*Manifest) PortConflicts ¶
func (*Manifest) PortsWanted ¶
type ManifestEntry ¶
type ManifestEntry struct { Build string `yaml:"build,omitempty"` Dockerfile string `yaml:"dockerfile,omitempty"` Image string `yaml:"image,omitempty"` Command interface{} `yaml:"command,omitempty"` Entrypoint string `yaml:"entrypoint,omitempty"` Environment interface{} `yaml:"environment,omitempty"` Links []string `yaml:"links,omitempty"` Ports interface{} `yaml:"ports,omitempty"` Volumes []string `yaml:"volumes,omitempty"` }
func (*ManifestEntry) EnvironmentArray ¶
func (me *ManifestEntry) EnvironmentArray() []string
func (*ManifestEntry) ResolvedEnvironment ¶
func (me *ManifestEntry) ResolvedEnvironment(m *Manifest) ([]string, error)
func (*ManifestEntry) ResolvedLinkVars ¶
func (me *ManifestEntry) ResolvedLinkVars(m *Manifest) (map[string]string, error)
NOTE: this is the simpler approach:
build up the ENV from the declared links assuming local dev is done on DOCKER_HOST