Documentation ¶
Index ¶
- type FileWriter
- type HeaderPalette
- type JSONPalette
- type Options
- type PlainPrinter
- func (p *PlainPrinter) PrintBody(body io.Reader, contentType string) error
- func (p *PlainPrinter) PrintDownload(length int64, filename string) error
- func (p *PlainPrinter) PrintHeader(header http.Header) error
- func (p *PlainPrinter) PrintRequestLine(req *http.Request) error
- func (p *PlainPrinter) PrintStatusLine(proto string, status string, statusCode int) error
- type PrettyPrinter
- func (p *PrettyPrinter) PrintBody(body io.Reader, contentType string) error
- func (p *PrettyPrinter) PrintDownload(length int64, filename string) error
- func (p *PrettyPrinter) PrintHeader(header http.Header) error
- func (p *PrettyPrinter) PrintRequestLine(req *http.Request) error
- func (p *PrettyPrinter) PrintStatusLine(proto string, status string, statusCode int) error
- type PrettyPrinterConfig
- type Printer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶ added in v0.6.0
type FileWriter struct {
// contains filtered or unexported fields
}
func NewFileWriter ¶ added in v0.6.0
func NewFileWriter(url *url.URL, options *Options) *FileWriter
func (*FileWriter) Download ¶ added in v0.6.0
func (f *FileWriter) Download(resp *http.Response) error
func (*FileWriter) Filename ¶ added in v0.6.0
func (f *FileWriter) Filename() string
type HeaderPalette ¶
type JSONPalette ¶
type PlainPrinter ¶
type PlainPrinter struct {
// contains filtered or unexported fields
}
func (*PlainPrinter) PrintBody ¶
func (p *PlainPrinter) PrintBody(body io.Reader, contentType string) error
func (*PlainPrinter) PrintDownload ¶ added in v0.6.0
func (p *PlainPrinter) PrintDownload(length int64, filename string) error
func (*PlainPrinter) PrintHeader ¶
func (p *PlainPrinter) PrintHeader(header http.Header) error
func (*PlainPrinter) PrintRequestLine ¶
func (p *PlainPrinter) PrintRequestLine(req *http.Request) error
func (*PlainPrinter) PrintStatusLine ¶
func (p *PlainPrinter) PrintStatusLine(proto string, status string, statusCode int) error
type PrettyPrinter ¶
type PrettyPrinter struct {
// contains filtered or unexported fields
}
func (*PrettyPrinter) PrintBody ¶
func (p *PrettyPrinter) PrintBody(body io.Reader, contentType string) error
func (*PrettyPrinter) PrintDownload ¶ added in v0.6.0
func (p *PrettyPrinter) PrintDownload(length int64, filename string) error
func (*PrettyPrinter) PrintHeader ¶
func (p *PrettyPrinter) PrintHeader(header http.Header) error
func (*PrettyPrinter) PrintRequestLine ¶
func (p *PrettyPrinter) PrintRequestLine(req *http.Request) error
func (*PrettyPrinter) PrintStatusLine ¶
func (p *PrettyPrinter) PrintStatusLine(proto string, status string, statusCode int) error
type PrettyPrinterConfig ¶
type Printer ¶
type Printer interface { PrintStatusLine(proto string, status string, statusCode int) error PrintRequestLine(request *http.Request) error PrintHeader(header http.Header) error PrintBody(body io.Reader, contentType string) error PrintDownload(length int64, filename string) error }
func NewPlainPrinter ¶
func NewPrettyPrinter ¶
func NewPrettyPrinter(config PrettyPrinterConfig) Printer
Click to show internal directories.
Click to hide internal directories.