Documentation
¶
Index ¶
- type ApiMeta
- func (m *ApiMeta) Authenticate() error
- func (m *ApiMeta) Colorize() *colorstring.Colorize
- func (m *ApiMeta) GlobalFlagSet(cmd string) *flag.FlagSet
- func (m *ApiMeta) Help() string
- func (m *ApiMeta) InitializeClient() (*http.Client, error)
- func (m *ApiMeta) Process(args []string) ([]string, error)
- func (m *ApiMeta) Prompt() string
- type ColorizeUi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiMeta ¶
type ApiMeta struct {
Color bool // True if output should be colored
Ui cli.Ui // Ui for output
// Gate Api client.
GateClient *gate.APIClient
// Spin CLI configuration.
Config config.Config
// Context for OAuth2 access token.
Context context.Context
// contains filtered or unexported fields
}
ApiMeta is the state & utility shared by our commands.
func (*ApiMeta) Authenticate ¶ added in v0.3.0
func (*ApiMeta) Colorize ¶
func (m *ApiMeta) Colorize() *colorstring.Colorize
Colorize initializes the ui colorization.
func (*ApiMeta) GlobalFlagSet ¶
GlobalFlagSet adds all global options to the flagset, and returns the flagset object for further modification by the subcommand.
type ColorizeUi ¶
type ColorizeUi struct {
Colorize *colorstring.Colorize
OutputColor string
InfoColor string
ErrorColor string
WarnColor string
Ui cli.Ui
}
func (*ColorizeUi) Error ¶
func (u *ColorizeUi) Error(message string)
func (*ColorizeUi) Info ¶
func (u *ColorizeUi) Info(message string)
func (*ColorizeUi) Output ¶
func (u *ColorizeUi) Output(message string)
func (*ColorizeUi) Warn ¶
func (u *ColorizeUi) Warn(message string)
Click to show internal directories.
Click to hide internal directories.