Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
func Print(data map[string]interface{}, opts OutputOptions) error
Print applies --query then rows= (if set) and renders the result.
func RefreshServiceDescs ¶
RefreshServiceDescs updates the Short description of every dynamically-registered API command to match the current language. Called from SetHelpFunc when --language overrides the active language at help-render time.
func RegisterCommands ¶
RegisterCommands dynamically adds one cobra.Command per service (from products.json), each with sub-commands for every API action found across all module JSON files.
Types ¶
type Invoker ¶
type Invoker struct {
// contains filtered or unexported fields
}
Invoker executes a single BCE API call.
type OutputFormat ¶
type OutputFormat string
const ( FormatJSON OutputFormat = "json" FormatTable OutputFormat = "table" FormatText OutputFormat = "text" )
type OutputOptions ¶
type OutputOptions struct {
Format OutputFormat
Query string // --query: JMESPath applied first to the raw response
Rows string // rows=: JMESPath applied after Query for table row extraction
Cols []string // column names for table output
NoColor bool
}
OutputOptions configures response rendering.
Click to show internal directories.
Click to hide internal directories.