MCPcopy Index your code
hub / github.com/prest/prest / NewScriptHandler

Function NewScriptHandler

controllers/script.go:22–30  ·  view source on GitHub ↗

NewScriptHandler creates a ScriptHandler.

(deps Deps)

Source from the content-addressed store, hash-verified

20
21// NewScriptHandler creates a ScriptHandler.
22func NewScriptHandler(deps Deps) *ScriptHandler {
23 return &ScriptHandler{
24 scripts: deps.Scripts,
25 executor: deps.Executor,
26 db: deps.DB,
27 cache: deps.Cache,
28 pgDB: deps.PGDatabase,
29 }
30}
31
32// Execute runs a script from the configured queries location.
33func (h *ScriptHandler) Execute(w http.ResponseWriter, r *http.Request) {

Calls

no outgoing calls