cmd

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunStack     = "packs/cflinuxfs2:run"
	BuildStack   = "packs/cflinuxfs2:build"
	NetworkStack = "packs/cflinuxfs2:network"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Load() (*app.YAML, error)
	Save(localYML *app.YAML) error
}

type Export

type Export struct {
	UI       UI
	Exporter Exporter
	FS       FS
	Help     Help
	Config   Config
}

func (*Export) Match

func (e *Export) Match(args []string) bool

func (*Export) Run

func (e *Export) Run(args []string) error

type Exporter added in v0.19.0

type Exporter interface {
	Export(config *forge.ExportConfig) (imageID string, err error)
}

type FS

type FS interface {
	ReadFile(path string) (io.ReadCloser, int64, error)
	WriteFile(path string) (io.WriteCloser, error)
	OpenFile(path string) (fs.ReadResetWriteCloser, int64, error)
	Abs(path string) (string, error)
	Watch(dir string, wait time.Duration) (change <-chan time.Time, done chan<- struct{}, err error)
}

type Forwarder added in v0.14.0

type Forwarder interface {
	Forward(config *forge.ForwardConfig) (health <-chan string, done func(), id string, err error)
}

type Help

type Help interface {
	Short()
}

type LocalApp added in v0.18.0

type LocalApp interface {
	Tar(path string) (io.ReadCloser, error)
}

type Pull

type Pull struct {
	UI        UI
	RemoteApp RemoteApp
	FS        FS
	Help      Help
	Config    Config
}

func (*Pull) Match

func (p *Pull) Match(args []string) bool

func (*Pull) Run

func (p *Pull) Run(args []string) error

type Push

type Push struct {
	UI        UI
	RemoteApp RemoteApp
	FS        FS
	Help      Help
	Config    Config
}

func (*Push) Match

func (p *Push) Match(args []string) bool

func (*Push) Run

func (p *Push) Run(args []string) error

type RemoteApp added in v0.18.0

type RemoteApp interface {
	Command(name string) (string, error)
	Droplet(name string) (droplet io.ReadCloser, size int64, err error)
	SetDroplet(name string, droplet io.Reader, size int64) error
	Env(name string) (*remote.AppEnv, error)
	SetEnv(name string, env map[string]string) error
	Restart(name string) error
	Services(name string) (forge.Services, error)
	Forward(name string, services forge.Services) (forge.Services, *forge.ForwardDetails, error)
}

type Run

type Run struct {
	UI        UI
	Runner    Runner
	Forwarder Forwarder
	RemoteApp RemoteApp
	FS        FS
	Help      Help
	Config    Config
}

func (*Run) Match

func (r *Run) Match(args []string) bool

func (*Run) Run

func (r *Run) Run(args []string) error

type Runner

type Runner interface {
	Run(config *forge.RunConfig) (status int64, err error)
}

type Stage

type Stage struct {
	UI        UI
	Stager    Stager
	RemoteApp RemoteApp
	TarApp    func(string) (io.ReadCloser, error)
	FS        FS
	Help      Help
	Config    Config
}

func (*Stage) Match

func (s *Stage) Match(args []string) bool

func (*Stage) Run

func (s *Stage) Run(args []string) error

type Stager

type Stager interface {
	Stage(config *forge.StageConfig) (droplet engine.Stream, err error)
}

type UI

type UI interface {
	Prompt(prompt string) string
	Output(format string, a ...interface{})
	Warn(format string, a ...interface{})
	Error(err error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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