Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDebug ¶
IsDebug returns true when --debug is set and --dry-run is not. When both flags are set, dry-run takes precedence.
Types ¶
type DebugClient ¶
type DebugClient struct {
Inner HTTPClient
Stderr io.Writer
}
DebugClient wraps an HTTP client and logs request/response diagnostics to stderr.
type DryRunClient ¶
DryRunClient intercepts HTTP requests and returns a synthetic response without making any network calls.
type HTTPClient ¶
HTTPClient is the interface that SDK clients implement.
func WrapClientForDiagnostics ¶
func WrapClientForDiagnostics(cmd *cobra.Command, inner HTTPClient) HTTPClient
WrapClientForDiagnostics wraps an HTTP client based on diagnostics mode. Returns the original client if no diagnostics flags are set.
Click to show internal directories.
Click to hide internal directories.