Documentation
¶
Overview ¶
Package preview renders Interseptor-styled HTTP request/response PNG previews for findings evidence and report screenshots (pure Go, no cgo).
Index ¶
Constants ¶
View Source
const MaxPNGBytes = 5 << 20
MaxPNGBytes is the hard cap for generated PNGs (matches store image upload limit).
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Layout ¶
type Layout string
Layout selects stacked (vertical) or side-by-side (horizontal) panes.
func NormalizeLayout ¶
NormalizeLayout maps user input; unknown/empty → LayoutHorizontal.
type Options ¶
type Options struct {
Side Side
Layout Layout // horizontal (default) | vertical
Theme Theme // light (default) | dark
Pretty *bool // indent JSON/XML bodies; nil defaults to true
Title string // subtitle under the product chrome (method host path → status)
MaxLines int // lines per pane before truncation (default 80)
MaxCols int // characters per line before wrap/cut (default 100)
}
Options controls layout and truncation for Render.
type Side ¶
type Side string
Side selects which HTTP message(s) to include in the preview.
func NormalizeSide ¶
NormalizeSide maps user input to a Side; unknown/empty → SideBoth.
Click to show internal directories.
Click to hide internal directories.