Documentation
¶
Overview ¶
Package app implements a common application struct with global configuration and a method per each CLI command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConfigShowProfileTmpl string
var ConfigTmpl string
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { GlobalFlags // contains filtered or unexported fields }
App describes the global application configuration.
func (*App) Assume ¶
func (a *App) Assume(flags AssumeFlags) error
Implementation of "assume" CLI command without any knowledge of spf13/cobra internals.
func (*App) CacheClean ¶
func (a *App) CacheClean(flags CacheFlags) error
Implementation of "cache clean" CLI command without any knowledge of spf13/cobra internals.
func (*App) ConfigList ¶
Implementation of "config list" CLI command without any knowledge of spf13/cobra internals.
func (*App) ConfigShowProfile ¶
func (a *App) ConfigShowProfile(flags AssumeFlags) error
Implementation of "config show-profile" CLI command without any knowledge of spf13/cobra internals.
func (*App) Version ¶
func (a *App) Version(flags VersionFlags) error
Implementation of "version" CLI command without any knowledge of spf13/cobra internals.
type AssumeFlags ¶
type AssumeFlags struct {
Profile string `mapstructure:"profile"`
}
CLI flags for this command.
type CacheFlags ¶
type CacheFlags struct { Password bool `mapstructure:"password"` Credential bool `mapstructure:"credential"` }
CLI flags for this command.
type GlobalFlags ¶
type GlobalFlags struct { NoColor bool `mapstructure:"no-color"` NoEmoji bool `mapstructure:"no-emoji"` NoGui bool `mapstructure:"no-gui"` Verbose bool `mapstructure:"verbose"` }
GlobalFlags describes all the CLI flags applied to all commands.
type VersionFlags ¶
type VersionFlags struct {
Full bool `mapstructure:"full"`
}
CLI flags for this command.