manifest

package
v0.0.0-...-4caa87e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2016 License: Apache-2.0, Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func Asset(name string) ([]byte, error)

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

func AssetDir(name string) ([]string, error)

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

func AssetInfo(name string) (os.FileInfo, error)

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 AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func Init

func Init(dir string) (changed []string, err error)

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type Manifest

type Manifest map[string]ManifestEntry

func Read

func Read(dir, filename string) (*Manifest, error)

func (*Manifest) Build

func (m *Manifest) Build(app, dir string, cache bool) []error

func (*Manifest) MissingEnvironment

func (m *Manifest) MissingEnvironment() ([]string, error)

func (*Manifest) PortConflicts

func (m *Manifest) PortConflicts() ([]string, error)

func (*Manifest) PortsWanted

func (m *Manifest) PortsWanted() []string

func (*Manifest) Push

func (m *Manifest) Push(app, registry, auth, tag string, flatten string) []error

func (*Manifest) Raw

func (m *Manifest) Raw() ([]byte, error)

func (*Manifest) Run

func (m *Manifest) Run(app string) []error

func (*Manifest) Write

func (m *Manifest) Write(filename string) error

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

Jump to

Keyboard shortcuts

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