NewHandler returns a new http.Handler that handles a scan request.
(caBundleFile string)
| 52 | |
| 53 | // NewHandler returns a new http.Handler that handles a scan request. |
| 54 | func NewHandler(caBundleFile string) (http.Handler, error) { |
| 55 | return api.HTTPHandler{ |
| 56 | Handler: api.HandlerFunc(scanHandler), |
| 57 | Methods: []string{"GET"}, |
| 58 | }, scan.LoadRootCAs(caBundleFile) |
| 59 | } |
| 60 | |
| 61 | // scanInfoHandler is an HTTP handler that returns a JSON blob result describing |
| 62 | // the possible families and scans to be run. |
no test coverage detected
searching dependent graphs…