Documentation
¶
Index ¶
- func Execute(in io.Reader, out, errOut io.Writer) int
- func ExecuteArgs(args []string, in io.Reader, out, errOut io.Writer) int
- func NewRoot(app *App) *cobra.Command
- func Version() string
- type App
- func (a *App) Client(requireAuth bool) (*transport.Client, error)
- func (a *App) Confirm(identifier string) error
- func (a *App) IdentifierRenderer() output.Renderer
- func (a *App) Load(requireAuth bool) error
- func (a *App) Render(value any, response *transport.Response) error
- func (a *App) RenderMutation(value any, response *transport.Response) error
- func (a *App) Renderer() output.Renderer
- func (a *App) Request(ctx context.Context, request transport.Request) (any, *transport.Response, error)
- func (a *App) ResolvedAPIURL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
In io.Reader
Out io.Writer
Err io.Writer
Start time.Time
Version string
// contains filtered or unexported fields
}
func (*App) IdentifierRenderer ¶
IdentifierRenderer is the renderer for a create or update: terse identifiers in the default table output, the complete resource under --output json|yaml.
An explicit --query is honoured as written. The operator has already said which fields they want; silently reducing the response first would drop the very keys their expression addresses.
func (*App) RenderMutation ¶
RenderMutation renders a create or update response through the identifier renderer.
A --dry-run response is the request envelope, not a resource, so it never goes through the identifier reduction; see render for how the envelope is printed.
func (*App) ResolvedAPIURL ¶
ResolvedAPIURL is the base URL requests are actually sent to, after normalization.
It is what `whoami` and `doctor` report, because the value in the profile is what the operator typed and the resolved value is what the client calls. QA lost time to a profile that displayed one host while requests went to another.