Documentation ¶
Index ¶
- Variables
- func Execute()
- func GetRootCommand() *cobra.Command
- type BoolFlagOpts
- type CmdContext
- func (ctx *CmdContext) InitApiClient() error
- func (ctx *CmdContext) Render(presentable presenters.Presentable) error
- func (ctx *CmdContext) RenderEx(presentable presenters.Presentable, options presenters.Options) error
- func (ctx *CmdContext) RenderView(views ...PresenterOption) (err error)
- func (ctx *CmdContext) RenderViewW(w io.Writer, views ...PresenterOption) error
- type CmdOption
- type CmdRunFn
- type Command
- type Initializer
- type InitializerFn
- type PresenterOption
- type StringFlagOpts
- type StringSliceFlagOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAbort = errors.New("abort")
Functions ¶
func GetRootCommand ¶
Types ¶
type BoolFlagOpts ¶
type CmdContext ¶
type CmdContext struct { Config flyctl.Config GlobalConfig flyctl.Config NS string Args []string Out io.Writer FlyClient *api.Client Terminal *terminal.Terminal WorkingDir string ConfigFile string AppName string AppConfig *flyctl.AppConfig }
func (*CmdContext) InitApiClient ¶
func (ctx *CmdContext) InitApiClient() error
func (*CmdContext) Render ¶
func (ctx *CmdContext) Render(presentable presenters.Presentable) error
func (*CmdContext) RenderEx ¶
func (ctx *CmdContext) RenderEx(presentable presenters.Presentable, options presenters.Options) error
func (*CmdContext) RenderView ¶
func (ctx *CmdContext) RenderView(views ...PresenterOption) (err error)
func (*CmdContext) RenderViewW ¶
func (ctx *CmdContext) RenderViewW(w io.Writer, views ...PresenterOption) error
type CmdOption ¶
type CmdOption func(*Command) Initializer
type CmdRunFn ¶
type CmdRunFn func(*CmdContext) error
type Command ¶
func BuildCommand ¶
func (*Command) AddBoolFlag ¶
func (c *Command) AddBoolFlag(options BoolFlagOpts)
func (*Command) AddCommand ¶
AddCommand adds subcommands to this command
func (*Command) AddStringFlag ¶
func (c *Command) AddStringFlag(options StringFlagOpts)
func (*Command) AddStringSliceFlag ¶ added in v0.0.84
func (c *Command) AddStringSliceFlag(options StringSliceFlagOpts)
type Initializer ¶
type Initializer struct { Setup InitializerFn PreRun InitializerFn }
type InitializerFn ¶
type InitializerFn func(*CmdContext) error
type PresenterOption ¶
type PresenterOption struct { Presentable presenters.Presentable Vertical bool HideHeader bool Title string }
type StringFlagOpts ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.