Documentation ¶
Index ¶
- Variables
- func DisplayProgress(ctx context.Context, prog *atomic.Int64, period time.Duration, host string, ...) func()
- func DisplaySpinner(ctx context.Context, period time.Duration, prefix, succ string, ...) func()
- func GetBufferedWriteCloser(ctx context.Context) io.WriteCloser
- func GetFormatAndOpts(ctx context.Context) (string, map[string]struct{})
- func IncludeBody(ctx context.Context)
- func InvocationInfo(ctx context.Context, cmd *cobra.Command, args []string)
- func IsPrintable(err error) bool
- func NewBufferedReader(ctx context.Context, r io.Reader) (io.Reader, *bytes.Buffer)
- func NewBufferedWriter(ctx context.Context, w io.Writer) (io.Writer, func() []byte)
- func NoColor(ctx context.Context)
- func Quiet(ctx context.Context)
- func ReceivingToStdout(ctx context.Context)
- func RestoreCursor(ctx context.Context)
- func SetEventsChan(ctx context.Context, ec chan events.Event)
- func SetFormat(ctx context.Context, f string)
- func SetFormatOpts(ctx context.Context, opts ...string)
- func UsageErrorF(format string, args ...interface{}) error
- func Wait(ctx context.Context)
- func WithOutput(ctx context.Context) (context.Context, error)
- func WrapPrintable(err error) error
- func WriteListeningOn(ctx context.Context, addr string)
- func WriteListeningOnQR(ctx context.Context, addr string)
- type ClientSession
- type PrintableError
- type Report
- type ResponseWriter
- type UsageError
Constants ¶
This section is empty.
Variables ¶
View Source
var NewHTTPRequest = events.NewHTTPRequest
Functions ¶
func DisplayProgress ¶
func DisplaySpinner ¶
func GetBufferedWriteCloser ¶
func GetBufferedWriteCloser(ctx context.Context) io.WriteCloser
func IncludeBody ¶
func IsPrintable ¶
func NewBufferedReader ¶
func NewBufferedWriter ¶
func ReceivingToStdout ¶
ReceivingToStdout ensures that only the appropriate content is sent to stdout. The summary is flagged to be skipped and if outputting json, make sure we have initiated the buffer that holds the received content.
func RestoreCursor ¶
func SetFormatOpts ¶
func UsageErrorF ¶
func WrapPrintable ¶
func WriteListeningOn ¶
func WriteListeningOnQR ¶
Types ¶
type ClientSession ¶
type ClientSession struct { Request *events.HTTPRequest `json:",omitempty"` File *events.File `json:",omitempty"` Response *events.HTTPResponse `json:",omitempty"` Error string `json:",omitempty"` }
type PrintableError ¶
type PrintableError struct {
Err error
}
func (*PrintableError) Error ¶
func (h *PrintableError) Error() string
func (*PrintableError) Unwrap ¶
func (h *PrintableError) Unwrap() error
type Report ¶
type Report struct { Success *ClientSession `json:",omitempty"` Attempts []*ClientSession `json:",omitempty"` }
type ResponseWriter ¶
type ResponseWriter struct { W http.ResponseWriter BufferedW io.Writer // contains filtered or unexported fields }
func (*ResponseWriter) Header ¶
func (w *ResponseWriter) Header() http.Header
func (*ResponseWriter) WriteHeader ¶
func (w *ResponseWriter) WriteHeader(statusCode int)
type UsageError ¶
type UsageError struct {
Err error
}
func (UsageError) Error ¶
func (n UsageError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.