Documentation
¶
Index ¶
- func HighlightWithRegex(text string, pattern string, baseFg lipgloss.Color, baseBg lipgloss.Color, ...) string
- func SprintBody(size int64, body []byte, headers model.Headers, pretty bool) (string, string, error)
- func SprintDotenv(rawYaml string) (string, error)
- func SprintFaint(str string) string
- func SprintFullResponse(resp *model.Response) (string, string, error)
- func SprintHeaders(headers model.Headers, pretty bool) (string, string, error)
- func SprintLua(rawYaml string) (string, error)
- func SprintPlainResponse(resp *model.Response, printHeaders bool, printBody bool) (string, string, error)
- func SprintPrettyFullResponse(resp *model.Response) (string, string, error)
- func SprintPrettyResponse(resp *model.Response, printHeaders bool, printBody bool) (string, string, error)
- func SprintRequest(request *model.Request, pretty bool) (string, string, error)
- func SprintRequestMold(m *model.RequestMold) (string, error)
- func SprintResponse(resp *model.Response, printOpts PrintOpts) (string, string, error)
- func SprintStarlark(rawYaml string) (string, error)
- func SprintStatus(resp *model.Response, pretty bool) (string, string, error)
- func SprintTraceInfo(traceInfo model.TraceInfo, pretty bool) (string, string, error)
- func SprintYaml(rawYaml string) (string, error)
- type BodyFormatHandler
- type BodyFormatter
- type DefaultContentTypeBodyHandler
- type HtmlContentTypeBodyHandler
- type JsonContentTypeBodyHandler
- type PrintOpts
- type XmlContentTypeBodyHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HighlightWithRegex ¶
func SprintBody ¶
func SprintDotenv ¶
func SprintFaint ¶
func SprintPlainResponse ¶
func SprintPrettyResponse ¶
func SprintRequest ¶
func SprintRequestMold ¶
func SprintRequestMold(m *model.RequestMold) (string, error)
func SprintResponse ¶
func SprintStarlark ¶
func SprintTraceInfo ¶
func SprintYaml ¶
Types ¶
type BodyFormatHandler ¶
type BodyFormatter ¶
type BodyFormatter struct {
// contains filtered or unexported fields
}
func NewBodyFormatter ¶
func NewBodyFormatter(handlers ...BodyFormatHandler) *BodyFormatter
type DefaultContentTypeBodyHandler ¶
type DefaultContentTypeBodyHandler struct{}
func (*DefaultContentTypeBodyHandler) Handle ¶
func (h *DefaultContentTypeBodyHandler) Handle(body []byte) (string, error)
func (*DefaultContentTypeBodyHandler) Supports ¶
func (h *DefaultContentTypeBodyHandler) Supports(contentType string) bool
type HtmlContentTypeBodyHandler ¶
type HtmlContentTypeBodyHandler struct{}
func (*HtmlContentTypeBodyHandler) Handle ¶
func (h *HtmlContentTypeBodyHandler) Handle(body []byte) (string, error)
func (*HtmlContentTypeBodyHandler) Supports ¶
func (h *HtmlContentTypeBodyHandler) Supports(contentType string) bool
type JsonContentTypeBodyHandler ¶
type JsonContentTypeBodyHandler struct{}
func (*JsonContentTypeBodyHandler) Handle ¶
func (h *JsonContentTypeBodyHandler) Handle(body []byte) (string, error)
func (*JsonContentTypeBodyHandler) Supports ¶
func (h *JsonContentTypeBodyHandler) Supports(contentType string) bool
type XmlContentTypeBodyHandler ¶
type XmlContentTypeBodyHandler struct{}
func (*XmlContentTypeBodyHandler) Handle ¶
func (h *XmlContentTypeBodyHandler) Handle(body []byte) (string, error)
func (*XmlContentTypeBodyHandler) Supports ¶
func (h *XmlContentTypeBodyHandler) Supports(contentType string) bool
Click to show internal directories.
Click to hide internal directories.