MCPcopy Create free account
hub / github.com/cloudflare/cfssl / scanInfoHandler

Function scanInfoHandler

api/scan/scan.go:63–68  ·  view source on GitHub ↗

scanInfoHandler is an HTTP handler that returns a JSON blob result describing the possible families and scans to be run.

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

61// scanInfoHandler is an HTTP handler that returns a JSON blob result describing
62// the possible families and scans to be run.
63func scanInfoHandler(w http.ResponseWriter, r *http.Request) error {
64 log.Info("setting up scaninfo handler")
65 response := api.NewSuccessResponse(scan.Default)
66 enc := json.NewEncoder(w)
67 return enc.Encode(response)
68}
69
70// NewInfoHandler returns a new http.Handler that handles a request for scan info.
71func NewInfoHandler() http.Handler {

Callers

nothing calls this directly

Calls 2

InfoFunction · 0.92
NewSuccessResponseFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…