Documentation ¶
Index ¶
- Constants
- type CmdContext
- func (commandContext *CmdContext) Frender(views ...PresenterOption) error
- func (commandContext *CmdContext) FrenderPrefix(prefix string, views ...PresenterOption) error
- func (commandContext *CmdContext) OutputJSON() bool
- func (commandContext *CmdContext) Render(presentable presenters.Presentable) error
- func (commandContext *CmdContext) Status(source string, status string, args ...interface{})
- func (commandContext *CmdContext) StatusLn()
- func (commandContext *CmdContext) Statusf(source string, status string, format string, args ...interface{})
- func (commandContext *CmdContext) WriteJSON(myData interface{})
- type JSON
- type PresenterOption
Constants ¶
View Source
const SBEGIN = "begin"
View Source
const SDETAIL = "detail"
View Source
const SDONE = "done"
View Source
const SERROR = "error"
View Source
const SINFO = "info"
View Source
const STITLE = "title"
View Source
const SWARN = "warning"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdContext ¶
type CmdContext struct { IO *iostreams.IOStreams Client *client.Client Config flyctl.Config GlobalConfig flyctl.Config NS string Args []string Out io.Writer WorkingDir string ConfigFile string AppName string AppConfig *flyctl.AppConfig MachineConfig *flyctl.MachineConfig }
CmdContext - context passed to commands being run
func NewCmdContext ¶
func (*CmdContext) Frender ¶
func (commandContext *CmdContext) Frender(views ...PresenterOption) error
Frender - render a view to a Writer
func (*CmdContext) FrenderPrefix ¶
func (commandContext *CmdContext) FrenderPrefix(prefix string, views ...PresenterOption) error
FrenderPrefix - render a view to a Writer
func (*CmdContext) OutputJSON ¶
func (commandContext *CmdContext) OutputJSON() bool
func (*CmdContext) Render ¶
func (commandContext *CmdContext) Render(presentable presenters.Presentable) error
Render - Render a presentable structure via the context
func (*CmdContext) Status ¶
func (commandContext *CmdContext) Status(source string, status string, args ...interface{})
func (*CmdContext) StatusLn ¶
func (commandContext *CmdContext) StatusLn()
func (*CmdContext) Statusf ¶
func (commandContext *CmdContext) Statusf(source string, status string, format string, args ...interface{})
func (*CmdContext) WriteJSON ¶
func (commandContext *CmdContext) WriteJSON(myData interface{})
type PresenterOption ¶
type PresenterOption struct { Presentable presenters.Presentable AsJSON bool Vertical bool HideHeader bool Title string }
Click to show internal directories.
Click to hide internal directories.