Documentation
¶
Overview ¶
Package shot is `dd-worker shot`: dd-shot's browser driver for a Stack sign-in (job stack S10). It starts the host browser with a DevTools endpoint on loopback, signs in as the stack's seed user (a form, or an HTTP call made from the page so the session cookie lands in the browser), checks the sign-in, then screenshots each path. It speaks the Chrome DevTools Protocol over the websocket library the worker already uses, so nothing is installed at run time.
It prints dd-shot's status lines only and never a credential:
DD-SHOT SIGNIN OK <form|http> DD-SHOT FAIL <DEF-id> signin <reason> DD-SHOT OK <DEF-id> <file> <bytes>B <path> DD-SHOT FAIL <DEF-id> <path> no-png <reason>
A failed sign-in takes no screenshot.
Index ¶
Constants ¶
const ( ExitOK = 0 ExitFail = 1 )
Status codes, as dd-shot's.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
Browser string // the host browser (policy agent_browser)
SignIn exec.ShotSignIn // from dd-shot-signin.json
Def string // the defect id, for the status lines
Dir string // fix-evidence/<DEF-id>
After int // the highest fix-NN already there
AppURL string // the app's URL, no trailing slash
Paths []string // the pages to screenshot
Timeout time.Duration // each page's bound, and the sign-in's
Out io.Writer
}
Options is one `dd-worker shot` call.