newapp

package
v2.0.0-alpha.15 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(plugs []plugins.Plugin, ctx context.Context, root string, name string, args []string) error

func Plugins

func Plugins() []plugins.Plugin

Types

type AfterNewapper

type AfterNewapper interface {
	plugins.Plugin
	AfterNewapp(ctx context.Context, root string, name string, args []string, err error) error
}

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

func (Cmd) CmdName

func (Cmd) CmdName() string

func (*Cmd) Flags

func (cmd *Cmd) Flags() *pflag.FlagSet

func (*Cmd) Main

func (cmd *Cmd) Main(ctx context.Context, root string, args []string) error

func (Cmd) PluginName

func (Cmd) PluginName() string

func (*Cmd) PrintFlags

func (cmd *Cmd) PrintFlags(w io.Writer) error

func (*Cmd) ScopedPlugins

func (cmd *Cmd) ScopedPlugins() []plugins.Plugin

func (*Cmd) WithPlugins

func (cmd *Cmd) WithPlugins(f plugins.Feeder)

type Executer

type Executer struct {
	// contains filtered or unexported fields
}

func (*Executer) Execute

func (e *Executer) Execute(ctx context.Context, root string, name string, args []string) error

func (*Executer) Flags

func (ex *Executer) Flags() *pflag.FlagSet

func (Executer) PluginName

func (Executer) PluginName() string

func (*Executer) PrintFlags

func (ex *Executer) PrintFlags(w io.Writer) error

func (*Executer) ScopedPlugins

func (e *Executer) ScopedPlugins() []plugins.Plugin

func (*Executer) WithPlugins

func (e *Executer) WithPlugins(f plugins.Feeder)

type Flagger

type Flagger interface {
	plugins.Plugin
	NewappFlags() []*flag.Flag
}

type NewCommandRunner

type NewCommandRunner interface {
	plugins.Plugin
	// GoBuild will be called to build, and execute, the
	// presented context and args.
	// The first plugin to receive this call will be the
	// only to answer it.
	RunNewCommand(ctx context.Context, root string, cmd *exec.Cmd) error
}

type Newapper

type Newapper interface {
	plugins.Plugin
	Newapp(ctx context.Context, root string, name string, args []string) error
}

type Pflagger

type Pflagger interface {
	plugins.Plugin
	NewappFlags() []*pflag.Flag
}

type Stderrer

type Stderrer = plugio.Errer

type Stdiner

type Stdiner = plugio.Inner

type Stdouter

type Stdouter = plugio.Outer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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