cmd

package
Version: v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RunStack     = "packs/cflinuxfs3:run"
	BuildStack   = "packs/cflinuxfs3:build"
	NetworkStack = "packs/cflinuxfs3: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
	Image    Image
	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 Image added in v0.20.0

type Image interface {
	Pull(stack string) <-chan engine.Progress
}

type LocalApp added in v0.18.0

type LocalApp interface {
	Tar(path string, excludes ...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
	Image     Image
	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
	Image     Image
	TarApp    func(string, ...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)
	Loading(message string, progress <-chan engine.Progress) 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL